FunctionCallGrammar
Grammar that defines and parses a function call. The output object is WalkedFunctionCall, which will later be converted to a FunctionCall by BlockTokenParser.
The following is an example of a function call:
.func {arg1} {arg2} name:{arg3}
body argument line 1
body argument line 2Content copied to clipboard
On its own, the function call grammar is context-aware, as the argument are not subject to syntactic rules, as they may represent Markdown content (argument type checking is performed in the function expansion stage of the pipeline instead, see com.quarkdown.core.function.call.binding). In order to achieve context-awareness, this grammar is stateful and mutable, as it needs to know whether it is currently parsing the outer 'rigid' syntax or an argument.
Parameters
allowsBody
whether the function call allows an indented body argument
Properties
Functions
Link copied to clipboard
override fun tryParse(tokens: TokenMatchesSequence, fromPosition: Int): ParseResult<WalkedFunctionCall>