-
Notifications
You must be signed in to change notification settings - Fork 55
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
feat: support non-indented cases in Scala3 match expression #436
Conversation
@@ -1157,7 +1162,7 @@ module.exports = grammar({ | |||
optional($.inline_modifier), | |||
field("value", $.expression), | |||
"match", | |||
field("body", choice($.case_block, $.indented_cases)), | |||
field("body", choice($.case_block, $.indented_cases, $.non_indented_cases)), |
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.
Should non_indented_cases
be aliased to indented_cases
here to preserve compatibility for any queries that may not expect nodes other than case_block
/indented_cases
, wdyt?
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.
+1 to this.
Looks like CI ran against an old version, without changes in grammar.js. Strange 🤔 |
@@ -850,8 +866,8 @@ class C { | |||
a | |||
.b | |||
// comment1 | |||
/* | |||
comment2 | |||
/* |
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.
Changes here and below are caused by changes in the behavior of tree-sitter test -u
, which now removes trailing spaces
Previously, we were running generate explicitly only on Linux, but at some point CI started testing on macOS as well? I fixed the CI in #437 |
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.
LGTM
I guess PREC.right adds to the complexity a bit? I'm ok with bumping this up. |
While working on this PR, I realized that the conflict between |
Addresses #264