Package org.mozilla.javascript.ast
Interface NodeVisitor
-
public interface NodeVisitor
Simple visitor interface for traversing the AST. The nodes are visited in an arbitrary order. The visitor must cast nodes to the appropriate type based on their token-type.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
visit(AstNode node)
Visits an AST node.
-
-
-
Method Detail
-
visit
boolean visit(AstNode node)
Visits an AST node.- Parameters:
node
- the AST node. Will never visit anAstRoot
node, since theAstRoot
is where the visiting begins.- Returns:
true
if the children should be visited. Iffalse
, the subtree rooted at this node is skipped. Thenode
argument should never benull
-- the individualAstNode
classes should skip any children that are not present in the source when they invoke this method.
-
-