goose icon indicating copy to clipboard operation
goose copied to clipboard

Support some features by rewriting the source AST

Open tchajed opened this issue 2 years ago • 0 comments

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).

tchajed avatar May 16 '22 19:05 tchajed