NBeatCall
Represents a dynamic beat call statement: beat(expr, args...).
Runs the resolved beat as a stack-preserving call (like a static
SomeBeat(args...) call), with the target resolved at runtime.
Instance Members
targetExpr: NExprTarget expression, resolved at runtime to a beat (a string name, a beat value or a beat reference).
targetPos: PositionPosition of the beat(...) target part.
Optional arguments passed to the target beat.
type(): String| Returns |
|---|
| String |
each(handleNode: Function): Void| Name | Type |
|---|---|
handleNode |
Function |
toJson(): DynamicConverts the beat call to a JSON representation.
| Returns | Description |
|---|---|
| Dynamic | Dynamic object containing beat call data |
new(id: NodeId, pos: Position, targetExpr: NExpr, targetPos: Position, ?leadingComments: Array<Comment>, ?trailingComments: Array<Comment>): VoidCreates a new dynamic beat call node.
| Name | Type | Default | Description |
|---|---|---|---|
id |
NodeId | ||
pos |
Position | Position in source where this call appears | |
targetExpr |
NExpr | Expression resolving to the target beat | |
targetPos |
Position | Position of the target part | |
leadingComments |
Array<Comment> | (optional) | Optional comments before the call |
trailingComments |
Array<Comment> | (optional) | Optional comments after the call |