-
Notifications
You must be signed in to change notification settings - Fork 3
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
A CodeQL library for Kaleidoscope #3
base: extractor
Are you sure you want to change the base?
Conversation
ql/lib/codeql/kaleidoscope/Ast.qll
Outdated
override Location getLocation() { result = node.getLocation() } | ||
} | ||
|
||
class ParenExpression extends Expression, TParenExpression { |
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.
Did you consider using the synthesis/desugaring framework for desugaring away parentheses?
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.
That felt a bit overkill .
this = | ||
any(BinaryOpExpression e | | ||
e.getOperator().getName() = "=" and | ||
variable = e.getLhs().(VariableExpression).getVariable() | ||
) or | ||
variable = this.(Initializer).getVariable() |
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.
Perhaps have another field rhs
, to avoid duplicating this pattern in getValue
.
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.
The rhs
is optional in a variable declaration (Initializer) in which case it defaults to 0.0
.
Update link in README.md
No description provided.