Skip to content

Commit

Permalink
Add support for default template arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
chrhansk committed Nov 2, 2024
1 parent d439eca commit 18cfba0
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 18cfba0

Please sign in to comment.