blockly > BasicCursor > prev
BasicCursor.prev() method
Find the previous node in the pre order traversal.
Signature:
prev(): ASTNode | null;
Returns:
ASTNode | null
The previous node, or null if the current node is not set or there is no previous value.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[null,null,["Last updated 2024-09-18 UTC."],[[["The `BasicCursor.prev()` method is used to navigate to the previous node in the pre-order traversal of an Abstract Syntax Tree (AST)."],["It returns the previous ASTNode or null if the current node isn't set or if there's no preceding node."],["This method helps in traversing the AST structure by providing a way to access the previous node in the sequence."]]],[]]