FunctionCall

data class FunctionCall(val range: IntRange, val tokens: List<FunctionCallToken>, val parserResult: WalkerParsingResult<WalkedFunctionCall>)

A function call in Quarkdown source code.

Parameters

range

the range in the source code where this function call appears

tokens

the list of tokens (parts) that make up this function call

parserResult

the result of parsing this function call

Constructors

Link copied to clipboard
constructor(range: IntRange, tokens: List<FunctionCallToken>, parserResult: WalkerParsingResult<WalkedFunctionCall>)

Properties

Link copied to clipboard

The name of the last function in a chain of function calls.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Given a function call that may contain chained calls, e.g. .func1 param:{value1}::func2 param:{value2}, which would be normally tokenized as a flat list of tokens, this property returns a sequence of (function name, tokens) pairs for each function in the chain.

Functions

Link copied to clipboard

Finds the argument at the given source index in this function call. Note that, by design, the range is between the argument's delimiters, excluding the parameter name if any.

Link copied to clipboard

Retrieves the documentation for a function call in the specified documentation directory.

Link copied to clipboard

Finds the parameter corresponding to the argument at the given source index in this function call. The argument can be either named or positional, and the lookup happens against the provided function documentation.

Link copied to clipboard

Finds the token within a function call that contains the specified index (relative to the source code the function call was tokenized from).

Link copied to clipboard

Returns the remainder of the parsing result, truncated to the specified index relative to the original source text.