Stack is a helper for Nodes that need to produce stack-based code instead of continuous flow.
They are usually needed in cases like If, Else.
Constructor
new StackNode(parent?)| Parameter | Type | Default Value |
|---|---|---|
| parent? | null | StackNode | null |
Constructs a new stack node.
| Accessor | Type | Modifiers |
|---|---|---|
| get type | string | static |
| get hasOutput | null | boolean | — |
| Method | Type | Modifiers |
|---|---|---|
| getElementType | (builder: any) => string | — |
| getNodeType | (builder: any) => string | — |
| getMemberType | (builder: any, name: any) => string | — |
| addToStack | (node: Node, index?: number) => StackNode | — |
| addToStackBefore | (node: Node) => StackNode | — |
| If | (boolNode: Node, method: Function) => StackNode | — |
| ElseIf | (boolNode: Node, method: Function) => StackNode | — |
| Else | (method: Function) => StackNode | — |
| Switch | (expression: any) => StackNode | — |
| Case | (...params: Array<…>) => StackNode | — |
| Default | (method: Function) => StackNode | — |
| setup | (builder: any) => any | — |
| build | (builder: any, ...params: Array<…>) => null | string | Node | — |
Extends
Node| Parameter | Type | Default Value |
|---|---|---|
| parent? | any | — |
Returns
StackNode