Optional extensions
If everything is working, here are some additional things you might consider working on:
- Add more tests.
- Add support for unary negation. This documentation will be helpful.
- Add support for
letexpressions (!!). - Improve some of the existing features, such as providing better error messages.
- Add support for generating a graphviz picture of the AST or for text-based trees.
- Add a simple optimizer for expressions, and allow the user to enable the optimizer with a flag. The optimizer would traverse the AST and simplify expressions that:
- multiply by 1
- multiply by 0
- add 0
- subtract 0
- divide by 1
- Anything else that comes to mind!