Skip to content

Commit

Permalink
Fix parsing for else to use command.
Browse files Browse the repository at this point in the history
I made it use cmd_identifier before, but it is better to use any type of
command syntax.
  • Loading branch information
CabalCrow committed May 23, 2024
1 parent fc3f008 commit 44d8b3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ module.exports = grammar({
seq(
KEYWORD().else,
choice(
field("else_block", choice($.block, $._expression, $.cmd_identifier)),
field("else_block", choice($.block, $._expression, $.command)),
field("else_branch", $.ctrl_if),
),
),
Expand All @@ -363,7 +363,7 @@ module.exports = grammar({
optional("\n"),
KEYWORD().else,
choice(
field("else_block", choice($.block, $._expression, $.cmd_identifier)),
field("else_block", choice($.block, $._expression, $.command)),
field("else_branch", alias($.ctrl_if_parenthesized, $.ctrl_if)),
),
),
Expand Down

0 comments on commit 44d8b3e

Please sign in to comment.