LFLCH / RobotDSL

A domain specific language and its support for mobile robots.
MIT License
2 stars 0 forks source link

RobotScript AST visitor #3

Closed LFLCH closed 6 months ago

LFLCH commented 7 months ago

The automatic AST given by langium cannot be easily parsed (without switch cases ), given the grammar we made is complex (the language has expressions, which is a delicate concept to handle).

The implementation of a design pattern, such as visitor helps to bypass the problem.

LFLCH commented 7 months ago

The visitor has been mainly implemented in 49f001360040f5a73d4aca07ea6e5c98ac1cecd0 The weaver has been mainly implemented in fecec6d8054da14791941ddff83a8d0d9e7894de

LFLCH commented 6 months ago

It is correctly done now. See the corresponding pull request & the tag