Class DelegatingCAstVisitor<C extends CAstVisitor.Context>
java.lang.Object
com.ibm.wala.cast.tree.visit.CAstVisitor<C>
com.ibm.wala.cast.tree.visit.DelegatingCAstVisitor<C>
Extend
CAstVisitor
<C>
to delegate unimplemented functionality to another visitor.
Needed to work around Java's retarded multiple inheritance rules. TODO: document me.- Author:
- Igor Peshansky
-
Nested Class Summary
Nested classes/interfaces inherited from class com.ibm.wala.cast.tree.visit.CAstVisitor
CAstVisitor.Context
-
Field Summary
Fields inherited from class com.ibm.wala.cast.tree.visit.CAstVisitor
currentPosition, DEBUG
-
Constructor Summary
ModifierConstructorDescriptionprotected
DelegatingCAstVisitor
(CAstVisitor<C> delegate) DelegatingCAstVisitor
<C>
constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected final CAstVisitor
<C> delegate()
protected boolean
doVisit
(CAstNode n, C context, CAstVisitor<C> visitor) Node processing hook; sub-classes are expected to override if they introduce new node types.protected boolean
doVisitEntity
(CAstEntity n, C context, CAstVisitor<C> visitor) Entity processing hook; sub-classes are expected to override if they introduce new entity types.protected boolean
enterEntity
(CAstEntity n, C context, CAstVisitor<C> visitor) Enter the entity visitor.protected boolean
enterNode
(CAstNode n, C c, CAstVisitor<C> visitor) Enter the node visitor.protected CAstEntity
getParent
(CAstEntity entity) Get the parent entity for a given entity.protected void
leaveArrayLength
(CAstNode n, C c, CAstVisitor<C> visitor) Leave an ArrayLength node.protected void
leaveArrayLiteral
(CAstNode n, C c, CAstVisitor<C> visitor) Leave a ArrayLiteral node.protected void
leaveArrayLiteralInitElement
(CAstNode n, int i, C c, CAstVisitor<C> visitor) Visit an ArrayLiteral node after processing the {i}th element initializer.protected void
leaveArrayLiteralObject
(CAstNode n, C c, CAstVisitor<C> visitor) Visit an ArrayLiteral node after processing the array object.protected void
leaveArrayRef
(CAstNode n, C c, CAstVisitor<C> visitor) Leave an ArrayRef node.protected void
leaveArrayRefAssign
(CAstNode n, CAstNode v, CAstNode a, C c, CAstVisitor<C> visitor) Visit an ArrayRef Assignment node after visiting the LHS.protected void
leaveArrayRefAssignOp
(CAstNode n, CAstNode v, CAstNode a, boolean pre, C c, CAstVisitor<C> visitor) Visit an ArrayRef Op/Assignment node after visiting the LHS.void
leaveAssign
(CAstNode n, C c, CAstVisitor<C> visitor) Leave an Assign node.protected void
leaveBinaryExpr
(CAstNode n, C c, CAstVisitor<C> visitor) Leave a BinaryExpr node.protected void
leaveBlockExpr
(CAstNode n, C c, CAstVisitor<C> visitor) Leave a BlockExpr node.protected void
leaveBlockExprAssign
(CAstNode n, CAstNode v, CAstNode a, C c, CAstVisitor<C> visitor) Visit a BlockExpr Assignment node after visiting the LHS.protected void
leaveBlockExprAssignOp
(CAstNode n, CAstNode v, CAstNode a, boolean pre, C c, CAstVisitor<C> visitor) Visit a BlockExpr Op/Assignment node after visiting the LHS.protected void
leaveBlockStmt
(CAstNode n, C c, CAstVisitor<C> visitor) Leave a BlockStmt node.protected void
leaveCall
(CAstNode n, C c, CAstVisitor<C> visitor) Leave a Call node.protected void
leaveCast
(CAstNode n, C c, CAstVisitor<C> visitor) Leave a Cast node.protected void
leaveCatch
(CAstNode n, C c, CAstVisitor<C> visitor) Leave a Catch node.protected void
leaveClassStmt
(CAstNode n, C c, CAstVisitor<C> visitor) Leave a FunctionStmt node.protected void
leaveConstant
(CAstNode n, C c, CAstVisitor<C> visitor) Leave a Constant node.protected void
leaveDeclStmt
(CAstNode n, C c, CAstVisitor<C> visitor) Leave a DeclStmt node.protected void
leaveEmpty
(CAstNode n, C c, CAstVisitor<C> visitor) Leave an Empty node.void
leaveEntity
(CAstEntity n, C context, CAstVisitor<C> visitor) Leave any entity.protected void
leaveFieldEntity
(CAstEntity n, C context, CAstVisitor<C> visitor) Leave a Field entity.protected void
leaveFileEntity
(CAstEntity n, C context, C fileContext, CAstVisitor<C> visitor) Leave a File entity.protected void
leaveFunctionEntity
(CAstEntity n, C context, C codeContext, CAstVisitor<C> visitor) Leave a Function entity.protected void
leaveFunctionExpr
(CAstNode n, C c, CAstVisitor<C> visitor) Leave a FunctionExpr node.protected void
leaveFunctionStmt
(CAstNode n, C c, CAstVisitor<C> visitor) Leave a FunctionStmt node.protected void
leaveGetCaughtException
(CAstNode n, C c, CAstVisitor<C> visitor) Leave a GetCaughtException node.protected void
leaveGoto
(CAstNode n, C c, CAstVisitor<C> visitor) Leave a Goto node.protected void
leaveIfExpr
(CAstNode n, C c, CAstVisitor<C> visitor) Leave an IfExpr node.protected void
leaveIfExprCondition
(CAstNode n, C c, CAstVisitor<C> visitor) Visit an IfExpr node after processing the condition.protected void
leaveIfExprTrueClause
(CAstNode n, C c, CAstVisitor<C> visitor) Visit an IfExpr node after processing the true clause.protected void
leaveIfgoto
(CAstNode n, C c, CAstVisitor<C> visitor) Leave an Ifgoto node.protected void
leaveIfStmt
(CAstNode n, C c, CAstVisitor<C> visitor) Leave an IfStmt node.protected void
leaveIfStmtCondition
(CAstNode n, C c, CAstVisitor<C> visitor) Visit an IfStmt node after processing the condition.protected void
leaveIfStmtTrueClause
(CAstNode n, C c, CAstVisitor<C> visitor) Visit an IfStmt node after processing the true clause.protected void
leaveInstanceOf
(CAstNode n, C c, CAstVisitor<C> visitor) Leave an InstanceOf node.protected void
leaveLabelStmt
(CAstNode n, C c, CAstVisitor<C> visitor) Leave a LabelStmt node.protected void
leaveLocalScope
(CAstNode n, C c, CAstVisitor<C> visitor) Leave a LocalScope node.protected void
leaveLoop
(CAstNode n, C c, CAstVisitor<C> visitor) Leave a Loop node.protected void
leaveLoopHeader
(CAstNode n, C c, CAstVisitor<C> visitor) Visit a Loop node after processing the loop header.protected void
leaveNew
(CAstNode n, C c, CAstVisitor<C> visitor) Leave a New node.void
leaveNode
(CAstNode n, C c, CAstVisitor<C> visitor) Leave any node.protected void
leaveObjectLiteral
(CAstNode n, C c, CAstVisitor<C> visitor) Leave an ObjectLiteral node.protected void
leaveObjectLiteralFieldInit
(CAstNode n, int i, C c, CAstVisitor<C> visitor) Visit an ObjectLiteral node after processing the {i}th field initializer.protected void
leaveObjectRef
(CAstNode n, C c, CAstVisitor<C> visitor) Leave an ObjectRef node.protected void
leaveObjectRefAssign
(CAstNode n, CAstNode v, CAstNode a, C c, CAstVisitor<C> visitor) Visit an ObjectRef Assignment node after visiting the LHS.protected void
leaveObjectRefAssignOp
(CAstNode n, CAstNode v, CAstNode a, boolean pre, C c, CAstVisitor<C> visitor) Visit an ObjectRef Op/Assignment node after visiting the LHS.protected void
leavePrimitive
(CAstNode n, C c, CAstVisitor<C> visitor) Leave a Primitive node.protected void
leaveReturn
(CAstNode n, C c, CAstVisitor<C> visitor) Leave a Return node.protected void
leaveScriptEntity
(CAstEntity n, C context, C codeContext, CAstVisitor<C> visitor) Leave a Script entity.protected void
leaveSpecialParentScope
(CAstNode n, C c, CAstVisitor<C> visitor) Leave a LocalScope node.protected void
leaveSuper
(CAstNode n, C c, CAstVisitor<C> visitor) Leave a Super node.protected void
leaveSwitch
(CAstNode n, C c, CAstVisitor<C> visitor) Leave a Switch node.protected void
leaveSwitchValue
(CAstNode n, C c, CAstVisitor<C> visitor) Visit a Switch node after processing the switch value.protected void
leaveThis
(CAstNode n, C c, CAstVisitor<C> visitor) Leave a This node.protected void
leaveThrow
(CAstNode n, C c, CAstVisitor<C> visitor) Leave a Throw node.protected void
leaveTry
(CAstNode n, C c, CAstVisitor<C> visitor) Leave a Try node.protected void
leaveTryBlock
(CAstNode n, C c, CAstVisitor<C> visitor) Visit a Try node after processing the try block.protected void
leaveTypeEntity
(CAstEntity n, C context, C typeContext, CAstVisitor<C> visitor) Leave a Type entity.protected void
leaveUnaryExpr
(CAstNode n, C c, CAstVisitor<C> visitor) Leave a UnaryExpr node.protected void
leaveUnwind
(CAstNode n, C c, CAstVisitor<C> visitor) Leave an Unwind node.protected void
leaveVar
(CAstNode n, C c, CAstVisitor<C> visitor) Leave a Var node.protected void
leaveVarAssign
(CAstNode n, CAstNode v, CAstNode a, C c, CAstVisitor<C> visitor) Visit a Var Assignment node after visiting the LHS.protected void
leaveVarAssignOp
(CAstNode n, CAstNode v, CAstNode a, boolean pre, C c, CAstVisitor<C> visitor) Visit a Var Op/Assignment node after visiting the LHS.protected void
leaveVoid
(CAstNode n, C c, CAstVisitor<C> visitor) Leave a Void node.protected C
makeCodeContext
(C context, CAstEntity n) Construct a context for a Code entity or delegate by default.protected C
makeFileContext
(C context, CAstEntity n) Construct a context for a File entity or delegate by default.protected C
makeLocalContext
(C context, CAstNode n) Construct a context for a LocalScope node or delegate by default.protected C
makeTypeContext
(C context, CAstEntity n) Construct a context for a Type entity or delegate by default.protected C
makeUnwindContext
(C context, CAstNode n, CAstVisitor<C> visitor) Construct a context for an Unwind node or delegate by default.protected void
postProcessEntity
(CAstEntity n, C context, CAstVisitor<C> visitor) Post-process an entity after visiting it.protected void
postProcessNode
(CAstNode n, C c, CAstVisitor<C> visitor) Post-process a node after visiting it.protected void
setParent
(CAstEntity entity, CAstEntity parent) Set the parent entity for a given entity.protected boolean
visitArrayLength
(CAstNode n, C c, CAstVisitor<C> visitor) Visit an ArrayLength node.protected boolean
visitArrayLiteral
(CAstNode n, C c, CAstVisitor<C> visitor) Visit an ArrayLiteral node.protected boolean
visitArrayRef
(CAstNode n, C c, CAstVisitor<C> visitor) Visit an ArrayRef node.protected boolean
visitArrayRefAssign
(CAstNode n, CAstNode v, CAstNode a, C c, CAstVisitor<C> visitor) Visit an ArrayRef Assignment node after visiting the RHS.protected boolean
visitArrayRefAssignOp
(CAstNode n, CAstNode v, CAstNode a, boolean pre, C c, CAstVisitor<C> visitor) Visit an ArrayRef Op/Assignment node after visiting the RHS.boolean
visitAssign
(CAstNode n, C c, CAstVisitor<C> visitor) Visit an Assign node.protected boolean
visitBinaryExpr
(CAstNode n, C c, CAstVisitor<C> visitor) Visit a BinaryExpr node.protected boolean
visitBlockExpr
(CAstNode n, C c, CAstVisitor<C> visitor) Visit a BlockExpr node.protected boolean
visitBlockExprAssign
(CAstNode n, CAstNode v, CAstNode a, C c, CAstVisitor<C> visitor) Visit a BlockExpr Assignment node after visiting the RHS.protected boolean
visitBlockExprAssignOp
(CAstNode n, CAstNode v, CAstNode a, boolean pre, C c, CAstVisitor<C> visitor) Visit a BlockExpr Op/Assignment node after visiting the RHS.protected boolean
visitBlockStmt
(CAstNode n, C c, CAstVisitor<C> visitor) Visit a BlockStmt node.protected boolean
visitCall
(CAstNode n, C c, CAstVisitor<C> visitor) Visit a Call node.protected boolean
visitCast
(CAstNode n, C c, CAstVisitor<C> visitor) Visit a Cast node.protected boolean
visitCatch
(CAstNode n, C c, CAstVisitor<C> visitor) Visit a Catch node.protected boolean
visitClassStmt
(CAstNode n, C c, CAstVisitor<C> visitor) Visit a ClassStmt node.protected boolean
visitConstant
(CAstNode n, C c, CAstVisitor<C> visitor) Visit a Constant node.protected boolean
visitDeclStmt
(CAstNode n, C c, CAstVisitor<C> visitor) Visit a DeclStmt node.protected boolean
visitEmpty
(CAstNode n, C c, CAstVisitor<C> visitor) Visit an Empty node.boolean
visitEntity
(CAstEntity n, C context, CAstVisitor<C> visitor) Visit any entity.protected boolean
visitFieldEntity
(CAstEntity n, C context, CAstVisitor<C> visitor) Visit a Field entity.protected boolean
visitFileEntity
(CAstEntity n, C context, C fileContext, CAstVisitor<C> visitor) Visit a File entity.protected boolean
visitFunctionEntity
(CAstEntity n, C context, C codeContext, CAstVisitor<C> visitor) Visit a Function entity.protected boolean
visitFunctionExpr
(CAstNode n, C c, CAstVisitor<C> visitor) Visit a FunctionExpr node.protected boolean
visitFunctionStmt
(CAstNode n, C c, CAstVisitor<C> visitor) Visit a FunctionStmt node.protected boolean
visitGetCaughtException
(CAstNode n, C c, CAstVisitor<C> visitor) Visit a GetCaughtException node.protected boolean
visitGoto
(CAstNode n, C c, CAstVisitor<C> visitor) Visit a Goto node.protected boolean
visitIfExpr
(CAstNode n, C c, CAstVisitor<C> visitor) Visit an IfExpr node.protected boolean
visitIfgoto
(CAstNode n, C c, CAstVisitor<C> visitor) Visit an Ifgoto node.protected boolean
visitIfStmt
(CAstNode n, C c, CAstVisitor<C> visitor) Visit an IfStmt node.protected boolean
visitInstanceOf
(CAstNode n, C c, CAstVisitor<C> visitor) Visit an InstanceOf node.protected boolean
visitLabelStmt
(CAstNode n, C c, CAstVisitor<C> visitor) Visit a LabelStmt node.protected boolean
visitLocalScope
(CAstNode n, C c, CAstVisitor<C> visitor) Visit a LocalScope node.protected boolean
visitLoop
(CAstNode n, C c, CAstVisitor<C> visitor) Visit a Loop node.protected boolean
visitNew
(CAstNode n, C c, CAstVisitor<C> visitor) Visit a New node.boolean
visitNode
(CAstNode n, C c, CAstVisitor<C> visitor) Visit any node.protected boolean
visitObjectLiteral
(CAstNode n, C c, CAstVisitor<C> visitor) Visit an ObjectLiteral node.protected boolean
visitObjectRef
(CAstNode n, C c, CAstVisitor<C> visitor) Visit an ObjectRef node.protected boolean
visitObjectRefAssign
(CAstNode n, CAstNode v, CAstNode a, C c, CAstVisitor<C> visitor) Visit an ObjectRef Assignment node after visiting the RHS.protected boolean
visitObjectRefAssignOp
(CAstNode n, CAstNode v, CAstNode a, boolean pre, C c, CAstVisitor<C> visitor) Visit an ObjectRef Op/Assignment node after visiting the RHS.protected boolean
visitPrimitive
(CAstNode n, C c, CAstVisitor<C> visitor) Visit a Primitive node.protected boolean
visitReturn
(CAstNode n, C c, CAstVisitor<C> visitor) Visit a Return node.protected boolean
visitScriptEntity
(CAstEntity n, C context, C codeContext, CAstVisitor<C> visitor) Visit a Script entity.protected boolean
visitSpecialParentScope
(CAstNode n, C c, CAstVisitor<C> visitor) Visit a LocalScope node.protected boolean
visitSuper
(CAstNode n, C c, CAstVisitor<C> visitor) Visit a Super node.protected boolean
visitSwitch
(CAstNode n, C c, CAstVisitor<C> visitor) Visit a Switch node.protected boolean
visitThis
(CAstNode n, C c, CAstVisitor<C> visitor) Visit a This node.protected boolean
visitThrow
(CAstNode n, C c, CAstVisitor<C> visitor) Visit a Throw node.protected boolean
visitTry
(CAstNode n, C c, CAstVisitor<C> visitor) Visit a Try node.protected boolean
visitTypeEntity
(CAstEntity n, C context, C typeContext, CAstVisitor<C> visitor) Visit a Type entity.protected boolean
visitUnaryExpr
(CAstNode n, C c, CAstVisitor<C> visitor) Visit a UnaryExpr node.protected boolean
visitUnwind
(CAstNode n, C c, CAstVisitor<C> visitor) Visit an Unwind node.protected boolean
visitVar
(CAstNode n, C c, CAstVisitor<C> visitor) Visit a Var node.protected boolean
visitVarAssign
(CAstNode n, CAstNode v, CAstNode a, C c, CAstVisitor<C> visitor) Visit a Var Assignment node after visiting the RHS.protected boolean
visitVarAssignOp
(CAstNode n, CAstNode v, CAstNode a, boolean pre, C c, CAstVisitor<C> visitor) Visit a Var Op/Assignment node after visiting the RHS.protected boolean
visitVoid
(CAstNode n, C c, CAstVisitor<C> visitor) Visit a Void node.Methods inherited from class com.ibm.wala.cast.tree.visit.CAstVisitor
doVisitArrayRefNode, doVisitAssignNodes, getCodeContext, getCurrentPosition, leaveArrayLiteralAssign, leaveAssert, leaveEachElementGet, leaveEachElementHasNext, leaveEcho, leaveForIn, leaveGlobalEntity, leaveInclude, leaveIsDefinedExpr, leaveMacroEntity, leaveMacroVar, leaveObjectLiteralAssign, leaveTypeLiteralExpr, leaveYield, makeSpecialParentContext, visit, visitAllChildren, visitArrayLiteralAssign, visitAssert, visitAssignNodes, visitChildren, visitEachElementGet, visitEachElementHasNext, visitEcho, visitEntities, visitForIn, visitGlobalEntity, visitInclude, visitIsDefinedExpr, visitMacroEntity, visitMacroVar, visitObjectLiteralAssign, visitScopedEntities, visitScopedEntities, visitTypeLiteralExpr, visitYield
-
Constructor Details
-
DelegatingCAstVisitor
DelegatingCAstVisitor
<C>
constructor. Needs to have a valid (non-null) delegate visitor.- Parameters:
delegate
- the visitor to delegate to for default implementation
-
-
Method Details
-
makeFileContext
Construct a context for a File entity or delegate by default.- Overrides:
makeFileContext
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
context
- a visitor-specific context in which this file was visitedn
- the file entity
-
makeTypeContext
Construct a context for a Type entity or delegate by default.- Overrides:
makeTypeContext
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
context
- a visitor-specific context in which this type was visitedn
- the type entity
-
makeCodeContext
Construct a context for a Code entity or delegate by default.- Overrides:
makeCodeContext
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
context
- a visitor-specific context in which the code was visitedn
- the code entity
-
makeLocalContext
Construct a context for a LocalScope node or delegate by default.- Overrides:
makeLocalContext
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
context
- a visitor-specific context in which the local scope was visitedn
- the local scope node
-
makeUnwindContext
Construct a context for an Unwind node or delegate by default.- Overrides:
makeUnwindContext
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
context
- a visitor-specific context in which the unwind was visitedn
- the unwind node
-
getParent
Get the parent entity for a given entity.- Overrides:
getParent
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
entity
- the child entity- Returns:
- the parent entity for the given entity
-
setParent
Set the parent entity for a given entity.- Overrides:
setParent
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
entity
- the child entityparent
- the parent entity
-
delegate
-
doVisitEntity
Entity processing hook; sub-classes are expected to override if they introduce new entity types. Should invoke super.doVisitEntity() for unprocessed entities.- Overrides:
doVisitEntity
in classCAstVisitor<C extends CAstVisitor.Context>
- Returns:
- true if entity was handled
-
enterEntity
Enter the entity visitor.- Overrides:
enterEntity
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the entity to processcontext
- a visitor-specific context- Returns:
- true if no further processing is needed
-
postProcessEntity
Post-process an entity after visiting it.- Overrides:
postProcessEntity
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the entity to processcontext
- a visitor-specific context
-
visitEntity
Visit any entity. Override only this to change behavior for all entities.- Overrides:
visitEntity
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the entity to processcontext
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveEntity
Leave any entity. Override only this to change behavior for all entities.- Overrides:
leaveEntity
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the entity to processcontext
- a visitor-specific context
-
visitFileEntity
Visit a File entity.- Overrides:
visitFileEntity
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the entity to processcontext
- a visitor-specific contextfileContext
- a visitor-specific context for this file- Returns:
- true if no further processing is needed
-
leaveFileEntity
Leave a File entity.- Overrides:
leaveFileEntity
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the entity to processcontext
- a visitor-specific contextfileContext
- a visitor-specific context for this file
-
visitFieldEntity
Visit a Field entity.- Overrides:
visitFieldEntity
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the entity to processcontext
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveFieldEntity
Leave a Field entity.- Overrides:
leaveFieldEntity
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the entity to processcontext
- a visitor-specific context
-
visitTypeEntity
Visit a Type entity.- Overrides:
visitTypeEntity
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the entity to processcontext
- a visitor-specific contexttypeContext
- a visitor-specific context for this type- Returns:
- true if no further processing is needed
-
leaveTypeEntity
Leave a Type entity.- Overrides:
leaveTypeEntity
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the entity to processcontext
- a visitor-specific contexttypeContext
- a visitor-specific context for this type
-
visitFunctionEntity
protected boolean visitFunctionEntity(CAstEntity n, C context, C codeContext, CAstVisitor<C> visitor) Visit a Function entity.- Overrides:
visitFunctionEntity
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the entity to processcontext
- a visitor-specific contextcodeContext
- a visitor-specific context for this function- Returns:
- true if no further processing is needed
-
leaveFunctionEntity
Leave a Function entity.- Overrides:
leaveFunctionEntity
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the entity to processcontext
- a visitor-specific contextcodeContext
- a visitor-specific context for this function
-
visitScriptEntity
Visit a Script entity.- Overrides:
visitScriptEntity
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the entity to processcontext
- a visitor-specific contextcodeContext
- a visitor-specific context for this script- Returns:
- true if no further processing is needed
-
leaveScriptEntity
Leave a Script entity.- Overrides:
leaveScriptEntity
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the entity to processcontext
- a visitor-specific contextcodeContext
- a visitor-specific context for this script
-
doVisit
Node processing hook; sub-classes are expected to override if they introduce new node types. Should invoke super.doVisit() for unprocessed nodes.- Overrides:
doVisit
in classCAstVisitor<C extends CAstVisitor.Context>
- Returns:
- true if node was handled
-
enterNode
Enter the node visitor.- Overrides:
enterNode
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
postProcessNode
Post-process a node after visiting it.- Overrides:
postProcessNode
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitNode
Visit any node. Override only this to change behavior for all nodes.- Overrides:
visitNode
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveNode
Leave any node. Override only this to change behavior for all nodes.- Overrides:
leaveNode
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitFunctionExpr
Visit a FunctionExpr node.- Overrides:
visitFunctionExpr
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveFunctionExpr
Leave a FunctionExpr node.- Overrides:
leaveFunctionExpr
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitFunctionStmt
Visit a FunctionStmt node.- Overrides:
visitFunctionStmt
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveFunctionStmt
Leave a FunctionStmt node.- Overrides:
leaveFunctionStmt
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitClassStmt
Visit a ClassStmt node.- Overrides:
visitClassStmt
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveClassStmt
Leave a FunctionStmt node.- Overrides:
leaveClassStmt
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitLocalScope
Visit a LocalScope node.- Overrides:
visitLocalScope
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveLocalScope
Leave a LocalScope node.- Overrides:
leaveLocalScope
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitBlockExpr
Visit a BlockExpr node.- Overrides:
visitBlockExpr
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveBlockExpr
Leave a BlockExpr node.- Overrides:
leaveBlockExpr
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitBlockStmt
Visit a BlockStmt node.- Overrides:
visitBlockStmt
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveBlockStmt
Leave a BlockStmt node.- Overrides:
leaveBlockStmt
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitLoop
Visit a Loop node.- Overrides:
visitLoop
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveLoopHeader
Visit a Loop node after processing the loop header.- Overrides:
leaveLoopHeader
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
leaveLoop
Leave a Loop node.- Overrides:
leaveLoop
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitGetCaughtException
Visit a GetCaughtException node.- Overrides:
visitGetCaughtException
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveGetCaughtException
Leave a GetCaughtException node.- Overrides:
leaveGetCaughtException
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitThis
Visit a This node.- Overrides:
visitThis
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveThis
Leave a This node.- Overrides:
leaveThis
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitSuper
Visit a Super node.- Overrides:
visitSuper
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveSuper
Leave a Super node.- Overrides:
leaveSuper
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitCall
Visit a Call node.- Overrides:
visitCall
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveCall
Leave a Call node.- Overrides:
leaveCall
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitVar
Visit a Var node.- Overrides:
visitVar
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveVar
Leave a Var node.- Overrides:
leaveVar
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitConstant
Visit a Constant node.- Overrides:
visitConstant
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveConstant
Leave a Constant node.- Overrides:
leaveConstant
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitBinaryExpr
Visit a BinaryExpr node.- Overrides:
visitBinaryExpr
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveBinaryExpr
Leave a BinaryExpr node.- Overrides:
leaveBinaryExpr
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitUnaryExpr
Visit a UnaryExpr node.- Overrides:
visitUnaryExpr
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveUnaryExpr
Leave a UnaryExpr node.- Overrides:
leaveUnaryExpr
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitArrayLength
Visit an ArrayLength node.- Overrides:
visitArrayLength
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveArrayLength
Leave an ArrayLength node.- Overrides:
leaveArrayLength
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitArrayRef
Visit an ArrayRef node.- Overrides:
visitArrayRef
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveArrayRef
Leave an ArrayRef node.- Overrides:
leaveArrayRef
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitDeclStmt
Visit a DeclStmt node.- Overrides:
visitDeclStmt
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveDeclStmt
Leave a DeclStmt node.- Overrides:
leaveDeclStmt
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitReturn
Visit a Return node.- Overrides:
visitReturn
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveReturn
Leave a Return node.- Overrides:
leaveReturn
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitIfgoto
Visit an Ifgoto node.- Overrides:
visitIfgoto
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveIfgoto
Leave an Ifgoto node.- Overrides:
leaveIfgoto
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitGoto
Visit a Goto node.- Overrides:
visitGoto
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveGoto
Leave a Goto node.- Overrides:
leaveGoto
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitLabelStmt
Visit a LabelStmt node.- Overrides:
visitLabelStmt
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveLabelStmt
Leave a LabelStmt node.- Overrides:
leaveLabelStmt
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitIfStmt
Visit an IfStmt node.- Overrides:
visitIfStmt
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveIfStmtCondition
Visit an IfStmt node after processing the condition.- Overrides:
leaveIfStmtCondition
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
leaveIfStmtTrueClause
Visit an IfStmt node after processing the true clause.- Overrides:
leaveIfStmtTrueClause
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
leaveIfStmt
Leave an IfStmt node.- Overrides:
leaveIfStmt
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitIfExpr
Visit an IfExpr node.- Overrides:
visitIfExpr
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveIfExprCondition
Visit an IfExpr node after processing the condition.- Overrides:
leaveIfExprCondition
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
leaveIfExprTrueClause
Visit an IfExpr node after processing the true clause.- Overrides:
leaveIfExprTrueClause
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
leaveIfExpr
Leave an IfExpr node.- Overrides:
leaveIfExpr
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitNew
Visit a New node.- Overrides:
visitNew
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveNew
Leave a New node.- Overrides:
leaveNew
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitObjectLiteral
Visit an ObjectLiteral node.- Overrides:
visitObjectLiteral
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveObjectLiteralFieldInit
Visit an ObjectLiteral node after processing the {i}th field initializer.- Overrides:
leaveObjectLiteralFieldInit
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processi
- the field position that was initializedc
- a visitor-specific context
-
leaveObjectLiteral
Leave an ObjectLiteral node.- Overrides:
leaveObjectLiteral
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitArrayLiteral
Visit an ArrayLiteral node.- Overrides:
visitArrayLiteral
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveArrayLiteralObject
Visit an ArrayLiteral node after processing the array object.- Overrides:
leaveArrayLiteralObject
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
leaveArrayLiteralInitElement
Visit an ArrayLiteral node after processing the {i}th element initializer.- Overrides:
leaveArrayLiteralInitElement
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processi
- the index that was initializedc
- a visitor-specific context
-
leaveArrayLiteral
Leave a ArrayLiteral node.- Overrides:
leaveArrayLiteral
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitObjectRef
Visit an ObjectRef node.- Overrides:
visitObjectRef
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveObjectRef
Leave an ObjectRef node.- Overrides:
leaveObjectRef
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitAssign
Visit an Assign node. Override only this to change behavior for all assignment nodes.- Overrides:
visitAssign
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveAssign
Leave an Assign node. Override only this to change behavior for all assignment nodes.- Overrides:
leaveAssign
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitArrayRefAssign
protected boolean visitArrayRefAssign(CAstNode n, CAstNode v, CAstNode a, C c, CAstVisitor<C> visitor) Visit an ArrayRef Assignment node after visiting the RHS.- Overrides:
visitArrayRefAssign
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the LHS node to processv
- the RHS node to processa
- the assignment node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveArrayRefAssign
Visit an ArrayRef Assignment node after visiting the LHS.- Overrides:
leaveArrayRefAssign
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the LHS node to processv
- the RHS node to processa
- the assignment node to processc
- a visitor-specific context
-
visitArrayRefAssignOp
protected boolean visitArrayRefAssignOp(CAstNode n, CAstNode v, CAstNode a, boolean pre, C c, CAstVisitor<C> visitor) Visit an ArrayRef Op/Assignment node after visiting the RHS.- Overrides:
visitArrayRefAssignOp
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the LHS node to processv
- the RHS node to processa
- the assignment node to processpre
- whether the value before the operation should be usedc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveArrayRefAssignOp
protected void leaveArrayRefAssignOp(CAstNode n, CAstNode v, CAstNode a, boolean pre, C c, CAstVisitor<C> visitor) Visit an ArrayRef Op/Assignment node after visiting the LHS.- Overrides:
leaveArrayRefAssignOp
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the LHS node to processv
- the RHS node to processa
- the assignment node to processpre
- whether the value before the operation should be usedc
- a visitor-specific context
-
visitObjectRefAssign
protected boolean visitObjectRefAssign(CAstNode n, CAstNode v, CAstNode a, C c, CAstVisitor<C> visitor) Visit an ObjectRef Assignment node after visiting the RHS.- Overrides:
visitObjectRefAssign
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the LHS node to processv
- the RHS node to processa
- the assignment node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveObjectRefAssign
protected void leaveObjectRefAssign(CAstNode n, CAstNode v, CAstNode a, C c, CAstVisitor<C> visitor) Visit an ObjectRef Assignment node after visiting the LHS.- Overrides:
leaveObjectRefAssign
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the LHS node to processv
- the RHS node to processa
- the assignment node to processc
- a visitor-specific context
-
visitObjectRefAssignOp
protected boolean visitObjectRefAssignOp(CAstNode n, CAstNode v, CAstNode a, boolean pre, C c, CAstVisitor<C> visitor) Visit an ObjectRef Op/Assignment node after visiting the RHS.- Overrides:
visitObjectRefAssignOp
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the LHS node to processv
- the RHS node to processa
- the assignment node to processpre
- whether the value before the operation should be usedc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveObjectRefAssignOp
protected void leaveObjectRefAssignOp(CAstNode n, CAstNode v, CAstNode a, boolean pre, C c, CAstVisitor<C> visitor) Visit an ObjectRef Op/Assignment node after visiting the LHS.- Overrides:
leaveObjectRefAssignOp
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the LHS node to processv
- the RHS node to processa
- the assignment node to processpre
- whether the value before the operation should be usedc
- a visitor-specific context
-
visitBlockExprAssign
protected boolean visitBlockExprAssign(CAstNode n, CAstNode v, CAstNode a, C c, CAstVisitor<C> visitor) Visit a BlockExpr Assignment node after visiting the RHS.- Overrides:
visitBlockExprAssign
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the LHS node to processv
- the RHS node to processa
- the assignment node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveBlockExprAssign
protected void leaveBlockExprAssign(CAstNode n, CAstNode v, CAstNode a, C c, CAstVisitor<C> visitor) Visit a BlockExpr Assignment node after visiting the LHS.- Overrides:
leaveBlockExprAssign
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the LHS node to processv
- the RHS node to processa
- the assignment node to processc
- a visitor-specific context
-
visitBlockExprAssignOp
protected boolean visitBlockExprAssignOp(CAstNode n, CAstNode v, CAstNode a, boolean pre, C c, CAstVisitor<C> visitor) Visit a BlockExpr Op/Assignment node after visiting the RHS.- Overrides:
visitBlockExprAssignOp
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the LHS node to processv
- the RHS node to processa
- the assignment node to processpre
- whether the value before the operation should be usedc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveBlockExprAssignOp
protected void leaveBlockExprAssignOp(CAstNode n, CAstNode v, CAstNode a, boolean pre, C c, CAstVisitor<C> visitor) Visit a BlockExpr Op/Assignment node after visiting the LHS.- Overrides:
leaveBlockExprAssignOp
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the LHS node to processv
- the RHS node to processa
- the assignment node to processpre
- whether the value before the operation should be usedc
- a visitor-specific context
-
visitVarAssign
Visit a Var Assignment node after visiting the RHS.- Overrides:
visitVarAssign
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the LHS node to processv
- the RHS node to processa
- the assignment node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveVarAssign
Visit a Var Assignment node after visiting the LHS.- Overrides:
leaveVarAssign
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the LHS node to processv
- the RHS node to processa
- the assignment node to processc
- a visitor-specific context
-
visitVarAssignOp
protected boolean visitVarAssignOp(CAstNode n, CAstNode v, CAstNode a, boolean pre, C c, CAstVisitor<C> visitor) Visit a Var Op/Assignment node after visiting the RHS.- Overrides:
visitVarAssignOp
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the LHS node to processv
- the RHS node to processa
- the assignment node to processpre
- whether the value before the operation should be usedc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveVarAssignOp
protected void leaveVarAssignOp(CAstNode n, CAstNode v, CAstNode a, boolean pre, C c, CAstVisitor<C> visitor) Visit a Var Op/Assignment node after visiting the LHS.- Overrides:
leaveVarAssignOp
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the LHS node to processv
- the RHS node to processa
- the assignment node to processpre
- whether the value before the operation should be usedc
- a visitor-specific context
-
visitSwitch
Visit a Switch node.- Overrides:
visitSwitch
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveSwitchValue
Visit a Switch node after processing the switch value.- Overrides:
leaveSwitchValue
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
leaveSwitch
Leave a Switch node.- Overrides:
leaveSwitch
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitThrow
Visit a Throw node.- Overrides:
visitThrow
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveThrow
Leave a Throw node.- Overrides:
leaveThrow
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitCatch
Visit a Catch node.- Overrides:
visitCatch
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveCatch
Leave a Catch node.- Overrides:
leaveCatch
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitUnwind
Visit an Unwind node.- Overrides:
visitUnwind
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveUnwind
Leave an Unwind node.- Overrides:
leaveUnwind
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitTry
Visit a Try node.- Overrides:
visitTry
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveTryBlock
Visit a Try node after processing the try block.- Overrides:
leaveTryBlock
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
leaveTry
Leave a Try node.- Overrides:
leaveTry
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitEmpty
Visit an Empty node.- Overrides:
visitEmpty
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveEmpty
Leave an Empty node.- Overrides:
leaveEmpty
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitPrimitive
Visit a Primitive node.- Overrides:
visitPrimitive
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leavePrimitive
Leave a Primitive node.- Overrides:
leavePrimitive
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitVoid
Visit a Void node.- Overrides:
visitVoid
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveVoid
Leave a Void node.- Overrides:
leaveVoid
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitCast
Visit a Cast node.- Overrides:
visitCast
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveCast
Leave a Cast node.- Overrides:
leaveCast
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitInstanceOf
Visit an InstanceOf node.- Overrides:
visitInstanceOf
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveInstanceOf
Leave an InstanceOf node.- Overrides:
leaveInstanceOf
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitSpecialParentScope
Visit a LocalScope node.- Overrides:
visitSpecialParentScope
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveSpecialParentScope
Leave a LocalScope node.- Overrides:
leaveSpecialParentScope
in classCAstVisitor<C extends CAstVisitor.Context>
- Parameters:
n
- the node to processc
- a visitor-specific context
-