mateusfccp / pinto

The pint° programming language
https://mateusfccp.me/pinto
MIT License
5 stars 1 forks source link

Add `toString` generation to the tree generator #13

Closed mateusfccp closed 1 day ago

mateusfccp commented 1 week ago

Currently, classes generate from the tree generator script does not override toString.

Because of this, when debug-printing the AST or semantic elements, we get Instance of 'Something'.

We should change the TreeGenerator so it generates a useful toString override.

For instance, for BooleanLiteral, instead of Instance of 'BooleanLiteral', it should be BooleanLiteral(literal: Token(type: TokenType.falseKeyword, lexeme: false, offset: 37)).