Skip to content

Commit

Permalink
Fix for(in) statement with no body
Browse files Browse the repository at this point in the history
  • Loading branch information
Beaglefoot committed Oct 15, 2023
1 parent ed8da85 commit 90c8d9b
Show file tree
Hide file tree
Showing 4 changed files with 23,982 additions and 23,795 deletions.
4 changes: 2 additions & 2 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ module.exports = grammar({
field('advancement', optional($._exp)),
')',
repeat($.comment),
choice($.block, $._statement)
choice($.block, $._statement, ';')
)
),

Expand All @@ -145,7 +145,7 @@ module.exports = grammar({
field('right', choice($.identifier, $.array_ref, $.ns_qualified_name)),
')',
repeat($.comment),
choice($.block, $._statement)
choice($.block, $._statement, ';')
)
),

Expand Down
8 changes: 8 additions & 0 deletions src/grammar.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,10 @@
{
"type": "SYMBOL",
"name": "_statement"
},
{
"type": "STRING",
"value": ";"
}
]
}
Expand Down Expand Up @@ -678,6 +682,10 @@
{
"type": "SYMBOL",
"name": "_statement"
},
{
"type": "STRING",
"value": ";"
}
]
}
Expand Down
Loading

0 comments on commit 90c8d9b

Please sign in to comment.