grammar: Add apply to control declaration
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
This commit is contained in:
@@ -83,7 +83,7 @@ export default grammar({
|
|||||||
variableDeclaration: $ => seq(optional($.annotations), $.typeRef, field('variable_name', $.identifier), optional(seq($.assignment, $.expression)), $._semicolon),
|
variableDeclaration: $ => seq(optional($.annotations), $.typeRef, field('variable_name', $.identifier), optional(seq($.assignment, $.expression)), $._semicolon),
|
||||||
|
|
||||||
// Control declarations
|
// Control declarations
|
||||||
control_declaration: $ => seq($.control, $.identifier, $.parameters, '{', repeat(choice($.table_declaration, $.action_declaration)), '}'),
|
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, $.statement),
|
||||||
table_declaration: $ => seq($.table, $.identifier, '{', optional($.table_property_list), '}'),
|
table_declaration: $ => seq($.table, $.identifier, '{', optional($.table_property_list), '}'),
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ control simple() {
|
|||||||
x: exact;
|
x: exact;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
apply {
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -47,6 +49,10 @@ control simple() {
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
(apply)
|
||||||
|
(statement
|
||||||
|
(blockStatement)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user