FunctionType

FunctionType

data class FunctionType

Data class to hold the parameters and results of a FunctionType from the docs:


functype ::=  ‘(’ ‘func’  t1:vec(param)  t2:vec(result) ‘)’ => [t1]→[t2]
param    ::=  ‘(’ ‘param’  id?  t:valtype ‘)’                 => t
result   ::=  ‘(’ ‘result’  t:valtype ‘)’                     => t

Fields

Name Description
val parameters: List<Param>
val returnValueEnums: List<Result>

Constructors

<init>

constructor(parameters: List<Param>, returnValueEnums: List<Result>)

Data class to hold the parameters and results of a FunctionType from the docs:


functype ::=  ‘(’ ‘func’  t1:vec(param)  t2:vec(result) ‘)’ => [t1]→[t2]
param    ::=  ‘(’ ‘param’  id?  t:valtype ‘)’                 => t
result   ::=  ‘(’ ‘result’  t:valtype ‘)’                     => t

Parameters

Name Description
parameters: List<Param>
returnValueEnums: List<Result>

Methods

toString

fun toString(): String

ReturnValue

Name Description
String

Extensions

validate

fun FunctionType.validate(context: ValidationContext): ValidationContext

Validates a FunctionType node.

Receiver

Name Description
FunctionType

Parameters

Name Description
context: ValidationContext

ReturnValue

Name Description
ValidationContext