Skip to content

Commit

Permalink
Allow terminating "," in case_clauses
Browse files Browse the repository at this point in the history
  • Loading branch information
theHamsta committed Dec 14, 2021
1 parent e0ab4cd commit a802812
Show file tree
Hide file tree
Showing 4 changed files with 27,515 additions and 23,449 deletions.
1 change: 1 addition & 0 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ module.exports = grammar({
case_clause: $ => seq(
'case',
commaSep1(field('pattern', choice($.expression, $.list_splat_pattern))),
optional(','),
optional($.if_clause),
':',
field('consequence', $._suite)
Expand Down
12 changes: 12 additions & 0 deletions src/grammar.json
Original file line number Diff line number Diff line change
Expand Up @@ -975,6 +975,18 @@
}
]
},
{
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "BLANK"
}
]
},
{
"type": "CHOICE",
"members": [
Expand Down
Loading

0 comments on commit a802812

Please sign in to comment.