Draco-lang / Compiler

The compiler repository for the Draco programming language.
Apache License 2.0
74 stars 9 forks source link

Add behaviors to AST Visitors #402

Open Kuinox opened 1 month ago

Kuinox commented 1 month ago

We should add an enum to have the AST Visitor adopt a certain behavior.
For example, currently the AST Visitor Visit the most specific node and that it, we may want that the Visitor call the base Visitor (which is very practical in the code Formatter), this should be optional since it come at a performance cost.

Kuinox commented 1 month ago

The formatter PR will add the described behavior but it won't be optional. The purpose of this issue/pr is to make it optional.