Class: InternalFunction
compiler.InternalFunction
Interface representation of a InternalFunction, which is used to provide functionality for Kipper specific keywords, internal logic and other implementation related handling that must be present for a program to work.
Since
0.8.0
Since
0.11.0 Became a class instead of an interface.
Table of contents
Constructors
Properties
Constructors
constructor
• new InternalFunction(identifier
, params
, returnType
)
Parameters
Name | Type |
---|---|
identifier |
string |
params |
InternalFunctionArgument [] |
returnType |
ProcessedType |
Defined in
kipper/core/src/compiler/semantics/runtime-internals/internal-function.ts:40
Properties
identifier
• Readonly
identifier: string
The identifier of the internal function.
The identifier may only contain default numbers and alphabet characters!
Example
Since
0.8.0
Defined in
kipper/core/src/compiler/semantics/runtime-internals/internal-function.ts:19
params
• Readonly
params: InternalFunctionArgument
[]
The args that are accepted inside this function. These are represented using InternalFunctionArgument.
The index in the array also represents the argument position inside the function. Meaning the first item in the array maps to the first argument inside the function.
Since
0.8.0
Defined in
kipper/core/src/compiler/semantics/runtime-internals/internal-function.ts:28
returnType
• Readonly
returnType: ProcessedType
The expected return of the function. If the return type is KipperVoidType void, then the function will not return anything.
Unlike BuiltInFunction, this can also be an array of types, which means that the function return may be a union.
Since
0.8.0
Defined in
kipper/core/src/compiler/semantics/runtime-internals/internal-function.ts:38