This was a demo for makeVisitor, but then it unfortunately worked a bit better than expected, and several bugs were found.
If new AST node types and operators are added, but printer is not updated, there will be an error message now.
Architecture was ruggedized to enforce correct handling of indents and precedences whenever code changes (Precedence, ExprPrinter, Printer). Further details are in code comments.
Issue
This was a demo for
makeVisitor
, but then it unfortunately worked a bit better than expected, and several bugs were found.If new AST node types and operators are added, but printer is not updated, there will be an error message now.
Architecture was ruggedized to enforce correct handling of indents and precedences whenever code changes (
Precedence
,ExprPrinter
,Printer
). Further details are in code comments.Closes #1037 Closes #1038 Closes #1042 Closes #1043
Checklist