blockly > ASTNode > createStackNode
ASTNode.createStackNode() method
Create an AST node of type stack. A stack, represented by its top block, is the set of all blocks connected to a top block, including the top block.
Signature:
static createStackNode(topBlock: Block): ASTNode | null;
Parameters
Parameter | Type | Description |
---|---|---|
topBlock | Block | A top block has no parent and can be found in the list returned by workspace.getTopBlocks(). |
Returns:
ASTNode | null
An AST node of type stack that points to the top block on the stack.