Add function calls
This commit is contained in:
parent
136924cb26
commit
8921953bbb
5 changed files with 1258 additions and 794 deletions
|
|
@ -33,6 +33,8 @@ module.exports = grammar({
|
|||
$.array_expression,
|
||||
$.record_expression,
|
||||
|
||||
$.function_call,
|
||||
|
||||
$.unary_expression,
|
||||
$.binary_expression,
|
||||
$.sequence_expression,
|
||||
|
|
@ -67,6 +69,13 @@ module.exports = grammar({
|
|||
)
|
||||
),
|
||||
|
||||
function_call: ($) => seq(
|
||||
field("function", $.identifier),
|
||||
"(",
|
||||
field("arguments", sepBy(",", $._expr)),
|
||||
")",
|
||||
),
|
||||
|
||||
unary_expression: ($) => seq(
|
||||
field("operator", alias("-", $.operator)),
|
||||
field("expression", $._expr),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue