Removed statements alias from gramar

This commit is contained in:
Maieul BOYER 2024-07-26 14:48:43 +02:00
parent 16aa4418e0
commit 2e26df0ef0
No known key found for this signature in database

View file

@ -183,9 +183,9 @@ module.exports = grammar({
if_statement: $ => seq(
'if',
field('cond', alias($._terminated_statement, $.statements)),
field('cond', $._terminated_statement),
'then',
field('body', alias(optional($._terminated_statement), $.statements)),
field('body', optional($._terminated_statement),
field('elif', repeat($.elif_clause)),
field('else', optional($.else_clause)),
'fi',
@ -193,14 +193,14 @@ module.exports = grammar({
elif_clause: $ => seq(
'elif',
field('cond', alias($._terminated_statement, $.statements)),
field('cond', $._terminated_statement),
'then',
field('body', alias(optional($._terminated_statement), $.statements)),
field('body', optional($._terminated_statement)),
),
else_clause: $ => seq(
'else',
field('body', alias(optional($._terminated_statement), $.statements)),
field('body', optional($._terminated_statement)),
),
case_statement: $ => seq(
@ -222,7 +222,7 @@ module.exports = grammar({
repeat(seq('|', field('value', choice($._literal, $._extglob_blob)))),
')',
repeat('\n'),
choice(field('body', alias($._statements, $.statements)),),
choice(field('body', $._statements),),
optional(';;')
),
@ -232,7 +232,7 @@ module.exports = grammar({
repeat(seq('|', field('value', choice($._literal, $._extglob_blob)))),
')',
repeat('\n'),
choice(field('body', alias($._statements, $.statements))),
choice(field('body', $._statements)),
';;'
),