Releases: LFLCH/RobotDSL
Very first release for RobotScript
Correct use of the visitor design pattern
The parsing of a RobotScript file is now done using the visitor design pattern.
All the services (interpreter, compiler, prettier, ...) that need to parse the AST only have to implement the visitor interface, and use the accept
method of a node when its value is unknown (for instance, an algebraic expression whose result we want to know in order to continue the analysis). You can have an example of implementation in this source code with the interpreter (src\interpretation\interpreterVisitor.ts
)
See more about it in the associated pull request (#6)
if_over_accept
The source code of this version contains uses of if/else structures while visiting the ast, in order to check the type of some ast nodes.
It is not ideal, but it has the advantage to use the ast.ts file automatically generated from the grammar.