goose
goose copied to clipboard
Support some features by rewriting the source AST
For control flow and assignments, it would be conceptually clearer if we supported them by rewriting the AST to satisfy some invariant and then translating the result. For example, this would have been the natural implementation of #37 and #25. The main tricky aspect is ensuring source information is preserved, but I believe the ast package is designed to handle this (source information might have to be explicitly set in the newly-generated code to make error locations accurate).