public class DefaultNodeVisitor extends java.lang.Object implements NNodeVisitor
NNodeVisitor.StopIterationException
Modifier and Type | Field and Description |
---|---|
protected boolean |
traverseIntoNodes |
Constructor and Description |
---|
DefaultNodeVisitor() |
Modifier and Type | Method and Description |
---|---|
void |
stopTraversal()
Once this is called, all
visit methods will return false . |
boolean |
visit(NAlias n) |
boolean |
visit(NAssert n) |
boolean |
visit(NAssign n) |
boolean |
visit(NAttribute n) |
boolean |
visit(NAugAssign n) |
boolean |
visit(NBinOp n) |
boolean |
visit(NBlock n) |
boolean |
visit(NBoolOp n) |
boolean |
visit(NBreak n) |
boolean |
visit(NCall n) |
boolean |
visit(NClassDef n) |
boolean |
visit(NCompare n) |
boolean |
visit(NComprehension n) |
boolean |
visit(NContinue n) |
boolean |
visit(NDelete n) |
boolean |
visit(NDict n) |
boolean |
visit(NEllipsis n) |
boolean |
visit(NExceptHandler n) |
boolean |
visit(NExec n) |
boolean |
visit(NExprStmt n) |
boolean |
visit(NFor n) |
boolean |
visit(NFunctionDef n) |
boolean |
visit(NGeneratorExp n) |
boolean |
visit(NGlobal n) |
boolean |
visit(NIf n) |
boolean |
visit(NIfExp n) |
boolean |
visit(NImport n) |
boolean |
visit(NImportFrom n) |
boolean |
visit(NIndex n) |
boolean |
visit(NKeyword n) |
boolean |
visit(NLambda n) |
boolean |
visit(NList n) |
boolean |
visit(NListComp n) |
boolean |
visit(NModule n) |
boolean |
visit(NName n) |
boolean |
visit(NNum n) |
boolean |
visit(NPass n) |
boolean |
visit(NPlaceHolder n) |
boolean |
visit(NPrint n) |
boolean |
visit(NQname n) |
boolean |
visit(NRaise n) |
boolean |
visit(NRepr n) |
boolean |
visit(NReturn n) |
boolean |
visit(NSlice n) |
boolean |
visit(NStr n) |
boolean |
visit(NSubscript n) |
boolean |
visit(NTryExcept n) |
boolean |
visit(NTryFinally n) |
boolean |
visit(NTuple n) |
boolean |
visit(NUnaryOp n) |
boolean |
visit(NUrl n) |
boolean |
visit(NWhile n) |
boolean |
visit(NWith n) |
boolean |
visit(NYield n) |
public void stopTraversal()
visit
methods will return false
.
If the current node's children are being visited, all remaining top-level
children of the node will be visited (without visiting their children),
and then tree traversal halts.
If the traversal should be halted immediately without visiting any further
nodes, the visitor can throw a NNodeVisitor.StopIterationException
.
public boolean visit(NAlias n)
visit
in interface NNodeVisitor
public boolean visit(NAssert n)
visit
in interface NNodeVisitor
public boolean visit(NAssign n)
visit
in interface NNodeVisitor
public boolean visit(NAttribute n)
visit
in interface NNodeVisitor
public boolean visit(NAugAssign n)
visit
in interface NNodeVisitor
public boolean visit(NBinOp n)
visit
in interface NNodeVisitor
public boolean visit(NBlock n)
visit
in interface NNodeVisitor
public boolean visit(NBoolOp n)
visit
in interface NNodeVisitor
public boolean visit(NBreak n)
visit
in interface NNodeVisitor
public boolean visit(NCall n)
visit
in interface NNodeVisitor
public boolean visit(NClassDef n)
visit
in interface NNodeVisitor
public boolean visit(NCompare n)
visit
in interface NNodeVisitor
public boolean visit(NComprehension n)
visit
in interface NNodeVisitor
public boolean visit(NContinue n)
visit
in interface NNodeVisitor
public boolean visit(NDelete n)
visit
in interface NNodeVisitor
public boolean visit(NDict n)
visit
in interface NNodeVisitor
public boolean visit(NEllipsis n)
visit
in interface NNodeVisitor
public boolean visit(NExceptHandler n)
visit
in interface NNodeVisitor
public boolean visit(NExec n)
visit
in interface NNodeVisitor
public boolean visit(NFor n)
visit
in interface NNodeVisitor
public boolean visit(NFunctionDef n)
visit
in interface NNodeVisitor
public boolean visit(NGeneratorExp n)
visit
in interface NNodeVisitor
public boolean visit(NGlobal n)
visit
in interface NNodeVisitor
public boolean visit(NIf n)
visit
in interface NNodeVisitor
public boolean visit(NIfExp n)
visit
in interface NNodeVisitor
public boolean visit(NImport n)
visit
in interface NNodeVisitor
public boolean visit(NImportFrom n)
visit
in interface NNodeVisitor
public boolean visit(NIndex n)
visit
in interface NNodeVisitor
public boolean visit(NKeyword n)
visit
in interface NNodeVisitor
public boolean visit(NLambda n)
visit
in interface NNodeVisitor
public boolean visit(NList n)
visit
in interface NNodeVisitor
public boolean visit(NListComp n)
visit
in interface NNodeVisitor
public boolean visit(NModule n)
visit
in interface NNodeVisitor
public boolean visit(NName n)
visit
in interface NNodeVisitor
public boolean visit(NNum n)
visit
in interface NNodeVisitor
public boolean visit(NPass n)
visit
in interface NNodeVisitor
public boolean visit(NPlaceHolder n)
visit
in interface NNodeVisitor
public boolean visit(NPrint n)
visit
in interface NNodeVisitor
public boolean visit(NQname n)
visit
in interface NNodeVisitor
public boolean visit(NRaise n)
visit
in interface NNodeVisitor
public boolean visit(NRepr n)
visit
in interface NNodeVisitor
public boolean visit(NReturn n)
visit
in interface NNodeVisitor
public boolean visit(NExprStmt n)
visit
in interface NNodeVisitor
public boolean visit(NSlice n)
visit
in interface NNodeVisitor
public boolean visit(NStr n)
visit
in interface NNodeVisitor
public boolean visit(NSubscript n)
visit
in interface NNodeVisitor
public boolean visit(NTryExcept n)
visit
in interface NNodeVisitor
public boolean visit(NTryFinally n)
visit
in interface NNodeVisitor
public boolean visit(NTuple n)
visit
in interface NNodeVisitor
public boolean visit(NUnaryOp n)
visit
in interface NNodeVisitor
public boolean visit(NUrl n)
visit
in interface NNodeVisitor
public boolean visit(NWhile n)
visit
in interface NNodeVisitor
public boolean visit(NWith n)
visit
in interface NNodeVisitor
public boolean visit(NYield n)
visit
in interface NNodeVisitor