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.


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


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.


ASTNode | null

The next node in the traversal.