Class: Function
Functional / Imperative programming function declaration. It is is composed by an identifier and one or more equations
Examples
ts
int foo (int bar) {
return bar;
}ts
def foo(bar):
return barConstructors
Constructor
new Function(
identifier,equations,loc?):Function
Parameters
| Parameter | Type |
|---|---|
identifier | SymbolPrimitive |
equations | Equation[] |
loc? | SourceLocation |
Returns
Function
Overrides
ASTNode.constructor
Methods
getMetadata()
getMetadata<
T>(key):T
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
key | string |
Returns
T
Inherited from
ASTNode.getMetadata
hasMetadata()
hasMetadata(
key):boolean
Parameters
| Parameter | Type |
|---|---|
key | string |
Returns
boolean
Inherited from
ASTNode.hasMetadata
setMetadata()
setMetadata(
key,value):void
Parameters
| Parameter | Type |
|---|---|
key | string |
value | any |
Returns
void
Inherited from
ASTNode.setMetadata