Skip to content

Commit

Permalink
Merge remote-tracking branch 'github/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
vanessa-rodrigues committed Aug 21, 2024
2 parents a42411d + 55a9b8a commit b6ee01b
Show file tree
Hide file tree
Showing 9 changed files with 57,190 additions and 58,946 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,12 @@ jobs:
with:
files: |
examples/**/*.py
!examples/cpython/Lib/test/test_annotationlib.py
!examples/cpython/Lib/test/test_type_params.py
!examples/cpython/Lib/test/test_compile.py
!examples/cpython/Tools/build/generate_re_casefix.py
!examples/cpython/Lib/test/test_annotationlib.py
!examples/cpython/Lib/test/test_type_params.py
invalid-files: |
examples/cpython/Lib/test/tokenizedata/badsyntax_3131.py
fuzz:
Expand Down
2 changes: 1 addition & 1 deletion bindings/go/binding_test.go

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

File renamed without changes.
15 changes: 11 additions & 4 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 @@ -806,6 +807,10 @@ module.exports = grammar({
field('argument', $.primary_expression),
)),

_not_in: _ => seq('not', 'in'),

_is_not: _ => seq('is', 'not'),

comparison_operator: $ => prec.left(PREC.compare, seq(
$.primary_expression,
repeat1(seq(
Expand All @@ -819,9 +824,9 @@ module.exports = grammar({
'>',
'<>',
'in',
alias(seq('not', 'in'), 'not in'),
alias($._not_in, 'not in'),
'is',
alias(seq('is', 'not'), 'is not'),
alias($._is_not, 'is not'),
)),
$.primary_expression,
)),
Expand Down Expand Up @@ -1171,11 +1176,13 @@ module.exports = grammar({
'exec',
'async',
'await',
'match',
),
$.identifier,
)),
alias('type', $.identifier),
alias(
choice('type', 'match'),
$.identifier,
),
),

true: _ => 'True',
Expand Down
2 changes: 2 additions & 0 deletions queries/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@
"is"
"not"
"or"
"is not"
"not in"
] @operator

[
Expand Down
73 changes: 45 additions & 28 deletions src/grammar.json

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

18 changes: 10 additions & 8 deletions src/node-types.json

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

Loading

0 comments on commit b6ee01b

Please # to comment.