typedlua
typedlua copied to clipboard
Add an AST visitor module and refactor the code generation to use it.
This allows code reuse when navigating the AST, and it allows new modules that handle a few node types to be much smaller and simpler (I'm working on a new module). In addition, the code generation and the checker are updated to use it, and some funcionts are split into smaller functions that handle concrete node types.
It seems like the visitor module's default visitor would make it simpler to implement visitors that only need to act on specific AST nodes, correct? Could you do a new pull request with just the visitor module, without converting the existing code generator and type checker? Thanks!
@mascarenhas can we close this after merging PR #115 ?