Skip to content

Commit

Permalink
Merge pull request #1 from chrhansk/master
Browse files Browse the repository at this point in the history
Add ellipsis operator to grammar
  • Loading branch information
b0o authored Nov 1, 2024
2 parents 30ba598 + 7ca5113 commit 0d1b690
Show file tree
Hide file tree
Showing 5 changed files with 157,824 additions and 156,817 deletions.
17 changes: 10 additions & 7 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -495,13 +495,16 @@ module.exports = grammar(Python, {

c_parameters: $ => seq("(", optional($._typedargslist), ")"),
_typedargslist: $ =>
seq(
commaSep1(seq(
$.maybe_typed_name,
optional(seq(":", $.c_type)),
optional(seq("=", choice($.expression, "*"))),
)),
optional(","),
choice(
"...",
seq(
commaSep1(seq(
$.maybe_typed_name,
optional(seq(":", $.c_type)),
optional(seq("=", choice($.expression, "*"))),
)),
optional(","),
),
),

gil_spec: _ => choice(seq("with", choice("gil", "nogil")), "nogil"),
Expand Down
181 changes: 95 additions & 86 deletions src/grammar.json

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

13 changes: 9 additions & 4 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 0d1b690

Please sign in to comment.