NBeatCall

NodeAstNodeloreline.NBeatCall (Class)

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: NExpr

Target expression, resolved at runtime to a beat (a string name, a beat value or a beat reference).


targetPos: Position

Position of the beat(...) target part.


args: Null<Array<NExpr>>

Optional arguments passed to the target beat.


type(): String
Returns
String

each(handleNode: Function): Void
Name Type
handleNode Function

toJson(): Dynamic

Converts 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>): Void

Creates 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