Skip to content

Commit

Permalink
fix: give match the same priority as normal identifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
amaanq committed Aug 17, 2024
1 parent 0dee05e commit 52ac741
Show file tree
Hide file tree
Showing 4 changed files with 54,758 additions and 54,664 deletions.
7 changes: 5 additions & 2 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ module.exports = grammar({
[$.named_expression, $.as_pattern],
[$.print_statement, $.primary_expression],
[$.type_alias_statement, $.primary_expression],
[$.match_statement, $.primary_expression],
],

supertypes: $ => [
Expand Down Expand Up @@ -1171,11 +1172,13 @@ module.exports = grammar({
'exec',
'async',
'await',
'match',
),
$.identifier,
)),
alias('type', $.identifier),
alias(
choice('type', 'match'),
$.identifier,
),
),

true: _ => 'True',
Expand Down
21 changes: 15 additions & 6 deletions src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 52ac741

Please sign in to comment.