~icefox/garnet#13: 
Parser/AST improvements

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

Libs:

Status
RESOLVED DUPLICATE
Submitter
~icefox
Assigned to
No-one
Submitted
2 months ago
Updated
2 months ago
Labels
T-THOUGHTS

~icefox REPORTED DUPLICATE 2 months ago

Duplicate of #6

Register here or Log in to comment, or comment via email.