grammar: Make apply statements have block bodies

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
This commit is contained in:
Will Hawkins
2026-04-20 03:25:07 -04:00
parent 95c489ecd7
commit a3a06efdb4
3 changed files with 8 additions and 14 deletions
+2 -2
View File
@@ -84,7 +84,7 @@ export default grammar({
// Control declarations
control_declaration: $ => seq($.control, $.identifier, $.parameters, '{', repeat(choice($.table_declaration, $.action_declaration)), $.apply_statement, '}'),
action_declaration: $ => seq($.action, $.identifier, $.parameters, $.statement),
action_declaration: $ => seq($.action, $.identifier, $.parameters, $.blockStatement),
table_declaration: $ => seq($.table, $.identifier, '{', optional($.table_property_list), '}'),
// Table property list
@@ -107,7 +107,7 @@ export default grammar({
assignmentStatement: $=> seq($.expression, $.assignment, $.expression, $._semicolon),
return_statement: $=> seq($._return, $.expression, $._semicolon),
exit_statement: $=> seq($._exit, $._semicolon),
apply_statement: $=> seq($.apply, $.statement),
apply_statement: $=> seq($.apply, $.blockStatement),
// Parser statements
parserStatements: $ => repeat1($.parserStatement),