blockly > BasicCursor > getNextNode_

BasicCursor.getNextNode_() method

Uses pre order traversal to navigate the Blockly AST. This will allow a user to easily navigate the entire Blockly AST without having to go in and out levels on the tree.

Signature:

protected getNextNode_(node: ASTNode | null, isValid: (p1: ASTNode | null) => boolean): ASTNode | null;

Parameters

Parameter Type Description
node ASTNode | null The current position in the AST.
isValid (p1: ASTNode | null) => boolean A function true/false depending on whether the given node should be traversed.

Returns:

ASTNode | null

The next node in the traversal.