Skip to content

Commit

Permalink
Merge pull request #3 from chrhansk/feature-template-default-params
Browse files Browse the repository at this point in the history
Add support for default template arguments
  • Loading branch information
b0o authored Nov 2, 2024
2 parents d439eca + 18cfba0 commit b7ca3ac
Show file tree
Hide file tree
Showing 5 changed files with 128,492 additions and 128,326 deletions.
8 changes: 7 additions & 1 deletion grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -470,10 +470,16 @@ module.exports = grammar(Python, {
),
),

template_default: $ =>
seq("=", "*"),

template_param: $ =>
seq($.identifier, optional($.template_default)),

template_params: $ =>
seq(
"[",
commaSep1($.identifier),
commaSep1($.template_param),
"]",
),

Expand Down
38 changes: 36 additions & 2 deletions src/grammar.json

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

26 changes: 25 additions & 1 deletion 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 b7ca3ac

Please sign in to comment.