-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Codegen/Rust: allow renaming in QL #18094
Conversation
This adds a `ql.name` codegen pragma to change the name of a property on the QL side. This is useful to give more meaningful names than what we get from the generated rust AST.
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.
SGTM.
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.
I believe Rust uses the terminology scrutinee, so perhaps getScrutinee
instead?
Ah, that is what @paldepind suggested in his request for this, I didn't know it was an official rust terminology. Matched expression seems more immediate to me, but I won't argue with established terminology! Will do |
Thanks a lot @redsun82. This is great and I think this (and doing the same for other |
This adds a
ql.name
codegen pragma to change the name of a property on the QL side. This is useful to give more meaningful names than what we get from the generated rust AST.This is used as an example for
MatchExpr.getExpr
, renamed toMatchExpr.getMatchedExpr
.