-
Notifications
You must be signed in to change notification settings - Fork 42
Small fixes to generated IR node and visitor types #1327
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
Conversation
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.
Left a couple of questions. Thanks.
|
) - Call enter/leave visitor methods when accepting choice types. These methods were added to the visitor trait, but were never called from the accept functions. - When generating IR node types for precedence expressions with multiple operator variants, those are collapsed into a single struct and we lose track of the operator that acts as a discriminant, because it's normally a unique terminal. Detect this case and don't remove the terminals in these cases. Eg. for an `AdditiveExpression` we now have the operator, a `PLUS` or a `MINUS`.
AdditiveExpression
we now have the operator, aPLUS
or aMINUS
.