Just tried to solve issues related parameter and description parser but after many tries unable to find a solution. So, thought to take help of mentor regarding it. He suggested that we should just collect the whole comments in the parser and handle the content later. With different options how to do it. The one I selected is that “parser could attach comments to the assignment node, throw away unrelated comments”.
so, what all over my mind going is that:
- first .scad file will go to the parser of OpenScad where we will write code to attach description and parameter comments to the assignment node.
- Then we could write c++ code to parse parameter comment attached to assignment node.
- we could write c++ code to parse parameter comment and convert it into assignment list which would be used to make input widgets.
- we could use a small separate parser to parse parameter comment and convert it into assignment list which would be used to make input widgets.
- Then we could return AST.