FunctionParameter

data class FunctionParameter(val name: String, val type: ParameterType, val index: Int, val isOptional: Boolean = false, val isExplicitlyBody: Boolean = false, val isInjected: Boolean = false, val isNullable: Boolean = false, val convert: ArgumentConverter? = null)

A declared Function parameter.

Parameters

name

name of the parameter

type

kind of value this parameter accepts

index

index of the parameter in the function signature

isOptional

whether the corresponding argument in a function call can be omitted

isExplicitlyBody

whether the parameter is explicitly reserved for the body argument, even if it's not the last one in the signature

isInjected

whether the corresponding argument in a function call is automatically injected and is not to be supplied by the caller.

isNullable

whether the parameter accepts null values. When true, com.quarkdown.core.function.value.NoneValue arguments are accepted and converted to Kotlin's null at invocation time.

convert

conversion to the parameter's static type, applied while binding. null for hand-built functions, whose invocation reads argument values directly.

Constructors

Link copied to clipboard
constructor(name: String, type: ParameterType, index: Int, isOptional: Boolean = false, isExplicitlyBody: Boolean = false, isInjected: Boolean = false, isNullable: Boolean = false, convert: ArgumentConverter? = null)

Properties

Link copied to clipboard
Link copied to clipboard
val index: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard