-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Syntax Recovery #34
base: master
Are you sure you want to change the base?
Conversation
The increment and decrement operations get converted into equivalent assignment statements during the first parse pass.
Bringing this branch up-to-date so that we can recover some of the tests inside it. This commit is super broken; a lot of the tests don't work, either because we don't handle that piece of syntax again yet (!) or because they need to be updated.
README.md
Outdated
* Stage 1 Parsing (AST Generation): 75% finished. | ||
* Stage 2 Parsing (AST validation and traversal): 15% finished. | ||
* Stage 3 Parsing (AST optimization): not planned (for now). | ||
* 6502 ASM Code Generation: not yet begun. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pretty sure this is no longer accurate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is there no react for "oops that's what I get for 2am commits"
Tests which test for syntax that the AstBuilder supports have been fixed. Tests which test for syntax that it does not support have been set up to fail and print the current AST. Failing tests almost all ALSO need to be rewritten to use the new AST structure.
@woodrowbarlow do you want to take this branch back over? Working on it won't get you into the translation pass system, but it will get you into the AstBuilder. a8fa0f9 provides an example of modifying it to handle an expression, and your own 87ebfb9 provides an example of modifying it to handle a statement. (It might help that both the AstBuilder and the translation pass system are based around the Visitor pattern, so getting comfortable with one will help with learning to work with the other.) |
Because the AstBuilder is now based on the translation pass system, working on this will absolutely get you into the translation pass system. |
Self-assigning this until #47 is done. |
Resurrecting @woodrowbarlow's #23 because I was going back over it and realized that it had a bunch of new tests which never made it into
master
.When #24 was merged, we lost a bunch of syntax-to-AST transformations which we were previously able to do. As of now, the entire syntax can be parsed as a concrete syntax tree, but... not all the way into the AST, which is what the tests check for.