Add parentherized expression

main
Clément FRÉVILLE 2 years ago
parent 93886d67e2
commit e189485969
Signed by: clement.freville2
GPG Key ID: 732E73BB80FA6076

@ -8,6 +8,7 @@ module.exports = grammar({
$.line_comment,
$.block_comment,
],
word: $ => $.identifier,
rules: {
source_file: $ => optional($._declarations),
@ -94,6 +95,7 @@ module.exports = grammar({
$.assignation,
$.infix_expression,
$.prefix_expression,
$.parentherized_expression,
$.expansion,
$.primary
),
@ -140,6 +142,11 @@ module.exports = grammar({
choice('!', '-'),
$._expression
)),
parentherized_expression: $ => seq(
'(',
$._expression,
')'
),
expansion: $ => choice(
$.variable,

Loading…
Cancel
Save