Currently the AST is very simple, just a tree of nodes with no idea what the original source is. There's two issues with this:
- Error reporting. We need nodes to have code spans pointing to the original text.
- Comments get lost. It would be nice to have comments preserved so we can trivially make a re-formatter. But since comments can be anywhere, basically, this gets annoying with designing the AST and parser. (Doc comments are somewhat different 'cause they can only be at fixed places in the syntax tree anyway.)