-
Notifications
You must be signed in to change notification settings - Fork 12
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
Update julia grammar #520
base: main
Are you sure you want to change the base?
Update julia grammar #520
Conversation
Update the Julia grammar to tree-sitter-julia#135. That PR introduced several breaking changes, including changes in the way function signatures and parameters were parsed.
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.
looks good to me
), | ||
|
||
_statement: ($, previous) => choice( | ||
previous, | ||
$.semgrep_ellipsis, | ||
), | ||
|
||
typed_parameter: ($, previous) => choice( |
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 removing this? We can still have ellpisis in type parameters even with this removal?
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.
Julia doesn't have a distinction between expressions and patterns, so function signatures are parsed as function calls, and checked in the lowering phase (after macro expansion). Having these parameter rules added a lot of duplication and conflicts, so we removed them.
We can still have ellpisis in type parameters even with this removal?
Yes. Ellipsis would now be parsed as splat_expression
.
Update the Julia grammar to tree-sitter/tree-sitter-julia#135. That PR introduced several breaking changes, including changes in the way function signatures and parameters were parsed.
(This should reduce the size of the
parser.c
in semgrep-julia by about 15MB).Checklist