-
-
Notifications
You must be signed in to change notification settings - Fork 538
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
ast: revisit Modifiers
#2958
Comments
I want a data structure to clearly indicate the allowed modifiers, with other disallowed modifiers attached to it. |
Would it be OK to: Only allow valid modifiers to be encoded in the AST. When parser finds a modifier in an invalid location, it raises an error and then ignores it (i.e. doesn't put it in AST) and can then continue parsing the rest of the file. Then we get a simpler AST which we can rely on being valid, but don't cause the parser to grind to a halt when it hits something illegal, and user still gets feedback about the invalid syntax. Does that count as recoverable? |
AST no longer uses |
The
Modifiers
data is used for error recoverable, but it causes a lot of confusion while working on the AST. Consider removing it.The text was updated successfully, but these errors were encountered: