Skip to content

Commit

Permalink
Add support for "for-from loops" with "by" argument
Browse files Browse the repository at this point in the history
  • Loading branch information
chrhansk committed Nov 21, 2024
1 parent 119588a commit cd8d4d4
Show file tree
Hide file tree
Showing 5 changed files with 165,789 additions and 160,125 deletions.
4 changes: 4 additions & 0 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,10 @@ module.exports = grammar(Python, {
choice("in", "from"),
)),
field("right", $._expressions),
optional(seq(
"by",
$._expressions,
)),
":",
field("body", $._suite),
field("alternative", optional($.else_clause)),
Expand Down
21 changes: 21 additions & 0 deletions src/grammar.json

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

18 changes: 18 additions & 0 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 cd8d4d4

Please sign in to comment.