Skip to content

5.2. Function Calls#

Syntax#


ArgumentsDeclaration = (* variant: *) PositionalArgumentsDeclaration
| (* variant: *) NamedArgumentsDeclaration;

PositionalArgumentsDeclaration = (* open_paren: *) OPEN_PAREN
(* arguments: *) PositionalArguments
(* close_paren: *) CLOSE_PAREN;

PositionalArguments = ((* item: *) Expression ((* separator: *) COMMA (* item: *) Expression)*)?;

NamedArgumentsDeclaration = (* open_paren: *) OPEN_PAREN
(* arguments: *) NamedArgumentGroup?
(* close_paren: *) CLOSE_PAREN;

NamedArgumentGroup = (* open_brace: *) OPEN_BRACE
(* arguments: *) NamedArguments
(* close_brace: *) CLOSE_BRACE;

NamedArguments = ((* item: *) NamedArgument ((* separator: *) COMMA (* item: *) NamedArgument)*)?;

(* Introduced in 0.6.2 *)
CallOptions = (* item: *) NamedArgument ((* separator: *) COMMA (* item: *) NamedArgument)*;

NamedArgument = (* name: *) IDENTIFIER
(* colon: *) COLON
(* value: *) Expression;

Documentation#

Note

This section is under construction. You are more than welcome to contribute suggestions to our GitHub repository.