Call expressions

Syntax
CallExpression :
   Expression GenericArgs? ( CallParams? )

GenericArgs :
   < IDENTIFIER | INTEGER_LITERAL (, IDENTIFIER | INTEGER_LITERAL)* >

CallParams :
   CallArg ( , CallArg )* ,?

CallArg :
   (CallArgLabel =)? Expression

CallArgLabel :
   IDENTIFIERLabel must correspond to the name of the called function argument at the given position. It can be omitted if parameter name and the name of the called function argument are equal.

A call expression calls a function. The syntax of a call expression is an expression, followed by a parenthesized comma-separated list of call arguments. Call arguments are expressions which optionally may be labeled in which case the label must correspond to name of the function argument at the given position. Labels do not allow to change the order in which parameters can be applied to a function. If the function eventually returns, then the expression completes.

Example:

contract Foo:

    pub fn baz():
        bar(100, val2=300)

    pub fn bar(val1: u256, val2: u256):
        pass