Class AstTranslator
java.lang.Object
com.ibm.wala.cast.tree.visit.CAstVisitor<AstTranslator.WalkContext>
com.ibm.wala.cast.ir.translator.AstTranslator
- All Implemented Interfaces:
ArrayOpHandler
,TranslatorToIR
- Direct Known Subclasses:
JavaCAst2IRTranslator
,JSAstTranslator
public abstract class AstTranslator
extends CAstVisitor<AstTranslator.WalkContext>
implements ArrayOpHandler, TranslatorToIR
Common code to translate CAst to IR. Must be specialized by each language to handle semantics
appropriately.
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
static class
protected static final class
data structure for the final CFG for a method, based on the information in anAstTranslator.IncipientCFG
static class
lexical access information for some entity scope.class
protected static class
final class
holds the control-flow graph as it is being constructed.static class
protected static final class
basic block implementation used in the CFGs constructed during the IR-generating AST traversalfinal class
static interface
a scope in the symbol table built during AST traversalstatic enum
protected static interface
interface for name information stored in a symbol table.protected final class
protected static final class
static interface
Nested classes/interfaces inherited from class com.ibm.wala.cast.tree.visit.CAstVisitor
CAstVisitor.Context
-
Field Summary
Modifier and TypeFieldDescriptionstatic final boolean
static final boolean
static final boolean
static final boolean
static final boolean
protected Map
<CAstEntity, Set<String>> protected Map
<CAstEntity, Set<Pair<CAstEntity, String>>> protected final SSAInstructionFactory
protected final IClassLoader
protected final Map
<Object, CAstEntity> for handling languages that let you include other source files named statically (e.g., ABAP)Fields inherited from class com.ibm.wala.cast.tree.visit.CAstVisitor
currentPosition
-
Constructor Summary
ModifierConstructorDescriptionprotected
AstTranslator
(IClassLoader loader) protected
AstTranslator
(IClassLoader loader, Map<Object, CAstEntity> namedEntityResolver) protected
AstTranslator
(IClassLoader loader, Map<Object, CAstEntity> namedEntityResolver, ArrayOpHandler arrayOpHandler) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
assignValue
(CAstNode n, AstTranslator.WalkContext context, AstTranslator.Symbol ls, String nm, int rval) assign rval to nm as appropriate, depending on the scope of lsvoid
closeFunctionEntity
(CAstEntity n, AstTranslator.WalkContext parentContext, AstTranslator.WalkContext functionContext) protected abstract String
composeEntityName
(AstTranslator.WalkContext parent, CAstEntity f) create the language-appropriate name for fprotected abstract void
declareFunction
(CAstEntity N, AstTranslator.WalkContext context) declare a new function, represented by Nprotected abstract TypeReference
for a block that catches all exceptions, what is the root exception type that it can catch? E.g., for Java, java.lang.Throwableprotected abstract void
defineField
(CAstEntity topEntity, AstTranslator.WalkContext context, CAstEntity fieldEntity) define a new field fieldEntity within topEntityprotected abstract void
defineFunction
(CAstEntity N, AstTranslator.WalkContext definingContext, AbstractCFG<SSAInstruction, ? extends IBasicBlock<SSAInstruction>> cfg, SymbolTable symtab, boolean hasCatchBlock, Map<IBasicBlock<SSAInstruction>, TypeReference[]> catchTypes, boolean hasMonitorOp, AstTranslator.AstLexicalInformation lexicalInfo, AstMethod.DebuggingInformation debugInfo) fully define a function.protected abstract boolean
defineType
(CAstEntity type, AstTranslator.WalkContext wc) define a new (presumably nested) type.abstract void
doArrayRead
(AstTranslator.WalkContext context, int result, int arrayValue, CAstNode arrayRef, int[] dimValues) generate IR for a CAst array read, updating context.cfg()abstract void
doArrayWrite
(AstTranslator.WalkContext context, int arrayValue, CAstNode arrayRef, int[] dimValues, int rval) generate IR for a CAst array write, updating context.cfg()protected abstract void
doCall
(AstTranslator.WalkContext context, CAstNode call, int result, int exception, CAstNode name, int receiver, int[] arguments) generate IR for a CAst method call expression, updating context.cfg()protected abstract void
doFieldRead
(AstTranslator.WalkContext context, int result, int receiver, CAstNode elt, CAstNode parent) generate IR for a CAst field read, updating context.cfg()protected abstract void
doFieldWrite
(AstTranslator.WalkContext context, int receiver, CAstNode elt, CAstNode parent, int rval) generate IR for a CAst field write, updating context.cfg()protected int
doGlobalRead
(CAstNode node, AstTranslator.WalkContext context, String name, TypeReference type) generate instructions for a read of a globalprotected void
doGlobalWrite
(AstTranslator.WalkContext context, String name, TypeReference type, int rval) generate instructions for a write of a globalprotected void
doIsFieldDefined
(AstTranslator.WalkContext context, int result, int ref, CAstNode f) protected int
doLexicallyScopedRead
(CAstNode node, AstTranslator.WalkContext context, String name, TypeReference type) Note that the caller is responsible for ensuring that name is defined in a lexical scope.protected void
doLexicallyScopedWrite
(AstTranslator.WalkContext context, String name, TypeReference type, int rval) Note that the caller is responsible for ensuring that name is defined in a lexical scope.protected int
doLocalRead
(AstTranslator.WalkContext context, String name, TypeReference type) get the value number for a name defined locally (i.e., within the current method) by looking up the name in context.currentScope().protected void
doLocalWrite
(AstTranslator.WalkContext context, String nm, TypeReference type, int rval) add anAssignInstruction
to context.cfg() that copies rval to the value number of local nm.protected abstract void
doMaterializeFunction
(CAstNode node, AstTranslator.WalkContext context, int result, int exception, CAstEntity fn) generate IR for a CAst function expression, updating context.cfg()protected abstract void
doNewObject
(AstTranslator.WalkContext context, CAstNode newNode, int result, Object type, int[] arguments) generate IR for a CAst new expression, updating context.cfg()protected abstract void
doPrimitive
(int resultVal, AstTranslator.WalkContext context, CAstNode primitiveCall) generate IR for call modeling creation of primitive value, updating context.cfg()protected void
doPrologue
(AstTranslator.WalkContext context) generate prologue code for each function bodyprotected abstract void
doThrow
(AstTranslator.WalkContext context, int exception) generate IR for a CAst throw expression, updating context.cfg()protected boolean
enterEntity
(CAstEntity n, AstTranslator.WalkContext context, CAstVisitor<AstTranslator.WalkContext> visitor) Enter the entity visitor.protected abstract CAstType
the most-general exception type for the language being translatedprotected int
protected String[]
protected AstTranslator.WalkContext
getCodeContext
(AstTranslator.WalkContext context) protected abstract CAstSourcePositionMap.Position[]
protected static final CAstType
getTypeForNode
(AstTranslator.WalkContext context, CAstNode node) protected void
some languages let you omit initialization of certain fields when writing an object literal (e.g., PHP).protected boolean
If this returns true, new global declarations get created for any attempt to access a non-existent variable (believe it or not, JavaScript actually does this!)protected boolean
If this returns true, then attempts to lookup non-existent names return `null' rather than tripping an assertion.protected boolean
ignoreName
(String name) void
initFunctionEntity
(CAstEntity n, AstTranslator.WalkContext functionContext) protected boolean
isExceptionLabel
(Object label) protected void
leaveArrayLength
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave an ArrayLength node.protected void
leaveArrayLiteral
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave a ArrayLiteral node.protected void
leaveArrayLiteralInitElement
(CAstNode n, int i, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit an ArrayLiteral node after processing the {i}th element initializer.protected void
leaveArrayLiteralObject
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit an ArrayLiteral node after processing the array object.protected void
leaveArrayRef
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave an ArrayRef node.protected void
leaveArrayRefAssign
(CAstNode n, CAstNode v, CAstNode a, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit an ArrayRef Assignment node after visiting the LHS.protected void
leaveArrayRefAssignOp
(CAstNode n, CAstNode v, CAstNode a, boolean pre, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit an ArrayRef Op/Assignment node after visiting the LHS.protected void
leaveAssert
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit an InstanceOf node.void
leaveAssign
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave an Assign node.protected void
leaveBinaryExpr
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave a BinaryExpr node.protected void
leaveBlockExpr
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave a BlockExpr node.protected void
leaveBlockExprAssign
(CAstNode n, CAstNode v, CAstNode a, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a BlockExpr Assignment node after visiting the LHS.protected void
leaveBlockExprAssignOp
(CAstNode n, CAstNode v, CAstNode a, boolean pre, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a BlockExpr Op/Assignment node after visiting the LHS.protected void
leaveBlockStmt
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave a BlockStmt node.protected void
leaveCall
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave a Call node.protected void
leaveCatch
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave a Catch node.protected void
leaveConstant
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave a Constant node.protected void
leaveDeclStmt
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave a DeclStmt node.protected void
leaveEachElementGet
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave an FOR_EACH_ELEMENT_GET node.protected void
leaveEachElementHasNext
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) protected void
leaveEcho
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave an ECHO node.protected void
leaveEmpty
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave an Empty node.protected void
leaveFieldEntity
(CAstEntity n, AstTranslator.WalkContext context, CAstVisitor<AstTranslator.WalkContext> visitor) Leave a Field entity.protected void
leaveFileEntity
(CAstEntity n, AstTranslator.WalkContext context, AstTranslator.WalkContext fileContext, CAstVisitor<AstTranslator.WalkContext> visitor) Leave a File entity.protected void
leaveFunctionEntity
(CAstEntity n, AstTranslator.WalkContext context, AstTranslator.WalkContext codeContext, CAstVisitor<AstTranslator.WalkContext> visitor) Leave a Function entity.protected void
leaveFunctionExpr
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave a FunctionExpr node.protected void
leaveFunctionStmt
(CAstNode n, AstTranslator.WalkContext context, CAstVisitor<AstTranslator.WalkContext> visitor) Leave a FunctionStmt node.protected void
leaveGetCaughtException
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave a GetCaughtException node.protected void
leaveGlobalEntity
(CAstEntity n, AstTranslator.WalkContext context, CAstVisitor<AstTranslator.WalkContext> visitor) Leave a Field entity.protected void
leaveGoto
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave a Goto node.protected final void
leaveIfExpr
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave an IfExpr node.protected final void
leaveIfExprCondition
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit an IfExpr node after processing the condition.protected final void
leaveIfExprTrueClause
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit an IfExpr node after processing the true clause.protected void
leaveIfgoto
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave an Ifgoto node.protected final void
leaveIfStmt
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave an IfStmt node.protected final void
leaveIfStmtCondition
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit an IfStmt node after processing the condition.protected final void
leaveIfStmtTrueClause
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit an IfStmt node after processing the true clause.protected void
leaveInclude
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave an INCLUDE node.protected void
leaveIsDefinedExpr
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave an IS_DEFINED_EXPR node.protected void
leaveLabelStmt
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave a LabelStmt node.protected void
leaveLocalScope
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave a LocalScope node.protected final void
leaveLoop
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave a Loop node.protected final void
leaveLoopHeader
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a Loop node after processing the loop header.protected void
leaveNew
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave a New node.protected void
leaveObjectLiteral
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave an ObjectLiteral node.protected void
leaveObjectLiteralFieldInit
(CAstNode n, int i, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit an ObjectLiteral node after processing the {i}th field initializer.protected void
leaveObjectRef
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave an ObjectRef node.protected void
leaveObjectRefAssign
(CAstNode n, CAstNode v, CAstNode a, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit an ObjectRef Assignment node after visiting the LHS.protected void
leaveObjectRefAssignOp
(CAstNode n, CAstNode v, CAstNode a, boolean pre, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit an ObjectRef Op/Assignment node after visiting the LHS.protected void
leavePrimitive
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave a Primitive node.protected void
leaveReturn
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave a Return node.protected void
leaveScriptEntity
(CAstEntity n, AstTranslator.WalkContext context, AstTranslator.WalkContext codeContext, CAstVisitor<AstTranslator.WalkContext> visitor) Leave a Script entity.protected void
leaveSpecialParentScope
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) protected void
leaveSuper
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave a Super node.protected final void
leaveSwitch
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave a Switch node.protected final void
leaveSwitchValue
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a Switch node after processing the switch value.protected void
leaveThis
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave a This node.protected void
leaveThrow
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave a Throw node.protected final void
leaveTry
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave a Try node.protected final void
leaveTryBlock
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a Try node after processing the try block.protected void
leaveTypeEntity
(CAstEntity n, AstTranslator.WalkContext context, AstTranslator.WalkContext typeContext, CAstVisitor<AstTranslator.WalkContext> visitor) Leave a Type entity.protected void
leaveTypeLiteralExpr
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave an TYPE_LITERAL_EXPR node.protected void
leaveUnaryExpr
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave a UnaryExpr node.protected void
leaveUnwind
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave an Unwind node.protected void
leaveVar
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave a Var node.protected void
leaveVarAssign
(CAstNode n, CAstNode v, CAstNode a, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a Var Assignment node after visiting the LHS.protected void
leaveVarAssignOp
(CAstNode n, CAstNode v, CAstNode a, boolean pre, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a Var Op/Assignment node after visiting the LHS.protected void
leaveVoid
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave a Void node.protected void
leaveYield
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave a Return node.protected boolean
lift variable declarations for lexical scoping purposes?protected AstTranslator.WalkContext
makeCodeContext
(AstTranslator.WalkContext context, CAstEntity n) Construct a context for a Code entity.protected AstTranslator.WalkContext
Construct a context for a File entity.protected FieldReference
makeGlobalRef
(String globalName) creates a reference to a global named globalName.protected AstTranslator.WalkContext
makeLocalContext
(AstTranslator.WalkContext context, CAstNode n) Construct a context for a LocalScope node.protected String[]
makeNameMap
(CAstEntity n, Set<AstTranslator.Scope> scopes, SSAInstruction[] insts) protected AstTranslator.AbstractScope
makeScriptScope
(CAstEntity s, AstTranslator.Scope parent) protected AstTranslator.WalkContext
protected abstract TypeReference
protected AstTranslator.WalkContext
Construct a context for a Type entity.protected AstTranslator.Scope
makeTypeScope
(CAstEntity type, AstTranslator.Scope parent) protected AstTranslator.WalkContext
makeUnwindContext
(AstTranslator.WalkContext context, CAstNode n, CAstVisitor<AstTranslator.WalkContext> visitor) Construct a context for an Unwind node.protected int
processAssignOp
(CAstNode v, CAstNode a, int temp, AstTranslator.WalkContext c) protected int
processFunctionExpr
(CAstNode n, AstTranslator.WalkContext context) protected void
processIf
(CAstNode n, boolean isExpr, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) void
setDefaultValue
(SymbolTable symtab, int vn, Object value) protected boolean
protected abstract CAstType
topType()
the most-general type for the language being translatedvoid
translate
(CAstEntity N, AstTranslator.WalkContext context) void
translate
(CAstEntity N, ModuleEntry module) translate module, represented byCAstEntity
Nprotected IBinaryOpInstruction.IOperator
protected IConditionalBranchInstruction.IOperator
protected IUnaryOpInstruction.IOperator
protected abstract boolean
can lexical reads / writes access globals?protected abstract boolean
does the language care about using type-appropriate default values? For Java, the answer is yes (ints should get a default value of 0, null for pointers, etc.).protected boolean
visitArrayLength
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit an ArrayLength node.protected boolean
visitArrayLiteral
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit an ArrayLiteral node.protected boolean
visitArrayRef
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit an ArrayRef node.protected boolean
visitArrayRefAssign
(CAstNode n, CAstNode v, CAstNode a, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit an ArrayRef Assignment node after visiting the RHS.protected boolean
visitArrayRefAssignOp
(CAstNode n, CAstNode v, CAstNode a, boolean pre, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit an ArrayRef Op/Assignment node after visiting the RHS.protected boolean
visitAssert
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) boolean
visitAssign
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit an Assign node.protected boolean
visitBinaryExpr
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a BinaryExpr node.protected boolean
visitBlockExpr
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a BlockExpr node.protected boolean
visitBlockExprAssign
(CAstNode n, CAstNode v, CAstNode a, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a BlockExpr Assignment node after visiting the RHS.protected boolean
visitBlockExprAssignOp
(CAstNode n, CAstNode v, CAstNode a, boolean pre, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a BlockExpr Op/Assignment node after visiting the RHS.protected boolean
visitBlockStmt
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a BlockStmt node.protected boolean
visitCall
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a Call node.protected boolean
visitCatch
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a Catch node.protected boolean
visitConstant
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a Constant node.protected boolean
visitDeclStmt
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a DeclStmt node.protected boolean
visitEachElementGet
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit an InstanceOf node.protected boolean
visitEachElementHasNext
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Leave an InstanceOf node.protected boolean
visitEcho
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) protected boolean
visitEmpty
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit an Empty node.protected boolean
visitFieldEntity
(CAstEntity n, AstTranslator.WalkContext context, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a Field entity.protected boolean
visitFileEntity
(CAstEntity n, AstTranslator.WalkContext context, AstTranslator.WalkContext fileContext, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a File entity.protected boolean
visitFunctionEntity
(CAstEntity n, AstTranslator.WalkContext context, AstTranslator.WalkContext codeContext, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a Function entity.protected boolean
visitFunctionExpr
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a FunctionExpr node.protected boolean
visitFunctionStmt
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a FunctionStmt node.protected boolean
visitGetCaughtException
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a GetCaughtException node.protected boolean
visitGlobalEntity
(CAstEntity n, AstTranslator.WalkContext context, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a Field entity.protected boolean
visitGoto
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a Goto node.protected boolean
visitIfExpr
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit an IfExpr node.protected boolean
visitIfgoto
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit an Ifgoto node.protected boolean
visitIfStmt
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit an IfStmt node.protected boolean
visitIsDefinedExpr
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) protected boolean
visitLabelStmt
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a LabelStmt node.protected boolean
visitLocalScope
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a LocalScope node.protected boolean
visitLoop
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a Loop node.protected boolean
visitMacroEntity
(CAstEntity n, AstTranslator.WalkContext context, AstTranslator.WalkContext codeContext, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a Macro entity.protected boolean
visitNew
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a New node.protected boolean
visitObjectLiteral
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit an ObjectLiteral node.protected boolean
visitObjectRef
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit an ObjectRef node.protected boolean
visitObjectRefAssign
(CAstNode n, CAstNode v, CAstNode a, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit an ObjectRef Assignment node after visiting the RHS.protected boolean
visitObjectRefAssignOp
(CAstNode n, CAstNode v, CAstNode a, boolean pre, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit an ObjectRef Op/Assignment node after visiting the RHS.protected boolean
visitPrimitive
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a Primitive node.protected boolean
visitReturn
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a Return node.protected boolean
visitScriptEntity
(CAstEntity n, AstTranslator.WalkContext context, AstTranslator.WalkContext codeContext, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a Script entity.protected boolean
visitSpecialParentScope
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) protected boolean
visitSuper
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a Super node.protected boolean
visitSwitch
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a Switch node.protected boolean
visitThis
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a This node.protected boolean
visitThrow
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a Throw node.protected boolean
visitTry
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a Try node.protected boolean
visitTypeEntity
(CAstEntity n, AstTranslator.WalkContext context, AstTranslator.WalkContext typeContext, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a Type entity.protected boolean
visitTypeLiteralExpr
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit an TYPE_LITERAL_EXPR node.protected boolean
visitUnaryExpr
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a UnaryExpr node.protected boolean
visitUnwind
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit an Unwind node.protected boolean
visitVar
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a Var node.protected boolean
visitVarAssign
(CAstNode n, CAstNode v, CAstNode a, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a Var Assignment node after visiting the RHS.protected boolean
visitVarAssignOp
(CAstNode n, CAstNode v, CAstNode a, boolean pre, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a Var Op/Assignment node after visiting the RHS.protected boolean
visitVoid
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a Void node.protected boolean
visitYield
(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Visit a Return node.protected final void
Methods inherited from class com.ibm.wala.cast.tree.visit.CAstVisitor
doVisit, doVisitArrayRefNode, doVisitAssignNodes, doVisitEntity, enterNode, getCurrentPosition, getParent, leaveArrayLiteralAssign, leaveCast, leaveClassStmt, leaveEntity, leaveForIn, leaveInstanceOf, leaveMacroEntity, leaveMacroVar, leaveNode, leaveObjectLiteralAssign, postProcessEntity, postProcessNode, setParent, visit, visitAllChildren, visitArrayLiteralAssign, visitAssignNodes, visitCast, visitChildren, visitClassStmt, visitEntities, visitEntity, visitForIn, visitInclude, visitInstanceOf, visitMacroVar, visitNode, visitObjectLiteralAssign, visitScopedEntities, visitScopedEntities
-
Field Details
-
loader
-
namedEntityResolver
for handling languages that let you include other source files named statically (e.g., ABAP) -
insts
-
DEBUG_ALL
public static final boolean DEBUG_ALL- See Also:
-
DEBUG_TOP
public static final boolean DEBUG_TOP- See Also:
-
DEBUG_CFG
public static final boolean DEBUG_CFG- See Also:
-
DEBUG_NAMES
public static final boolean DEBUG_NAMES- See Also:
-
DEBUG_LEXICAL
public static final boolean DEBUG_LEXICAL- See Also:
-
entity2ExposedNames
-
entity2WrittenNames
-
-
Constructor Details
-
AstTranslator
protected AstTranslator(IClassLoader loader, Map<Object, CAstEntity> namedEntityResolver, ArrayOpHandler arrayOpHandler) -
AstTranslator
-
AstTranslator
-
-
Method Details
-
useDefaultInitValues
protected abstract boolean useDefaultInitValues()does the language care about using type-appropriate default values? For Java, the answer is yes (ints should get a default value of 0, null for pointers, etc.). For JavaScript, the answer is no, as any variable can hold the value 'undefined'. -
treatGlobalsAsLexicallyScoped
protected abstract boolean treatGlobalsAsLexicallyScoped()can lexical reads / writes access globals? -
topLevelFunctionsInGlobalScope
protected boolean topLevelFunctionsInGlobalScope() -
defaultCatchType
for a block that catches all exceptions, what is the root exception type that it can catch? E.g., for Java, java.lang.Throwable -
makeType
-
defineType
define a new (presumably nested) type. return true if type was successfully defined, false otherwise -
declareFunction
declare a new function, represented by N -
defineFunction
protected abstract void defineFunction(CAstEntity N, AstTranslator.WalkContext definingContext, AbstractCFG<SSAInstruction, ? extends IBasicBlock<SSAInstruction>> cfg, SymbolTable symtab, boolean hasCatchBlock, Map<IBasicBlock<SSAInstruction>, TypeReference[]> catchTypes, boolean hasMonitorOp, AstTranslator.AstLexicalInformation lexicalInfo, AstMethod.DebuggingInformation debugInfo) fully define a function. invoked after all the code of the function has been processed -
defineField
protected abstract void defineField(CAstEntity topEntity, AstTranslator.WalkContext context, CAstEntity fieldEntity) define a new field fieldEntity within topEntity -
composeEntityName
create the language-appropriate name for f -
doThrow
generate IR for a CAst throw expression, updating context.cfg() -
doArrayRead
public abstract void doArrayRead(AstTranslator.WalkContext context, int result, int arrayValue, CAstNode arrayRef, int[] dimValues) generate IR for a CAst array read, updating context.cfg()- Specified by:
doArrayRead
in interfaceArrayOpHandler
-
doArrayWrite
public abstract void doArrayWrite(AstTranslator.WalkContext context, int arrayValue, CAstNode arrayRef, int[] dimValues, int rval) generate IR for a CAst array write, updating context.cfg()- Specified by:
doArrayWrite
in interfaceArrayOpHandler
-
doFieldRead
protected abstract void doFieldRead(AstTranslator.WalkContext context, int result, int receiver, CAstNode elt, CAstNode parent) generate IR for a CAst field read, updating context.cfg() -
doFieldWrite
protected abstract void doFieldWrite(AstTranslator.WalkContext context, int receiver, CAstNode elt, CAstNode parent, int rval) generate IR for a CAst field write, updating context.cfg() -
doMaterializeFunction
protected abstract void doMaterializeFunction(CAstNode node, AstTranslator.WalkContext context, int result, int exception, CAstEntity fn) generate IR for a CAst function expression, updating context.cfg() -
doNewObject
protected abstract void doNewObject(AstTranslator.WalkContext context, CAstNode newNode, int result, Object type, int[] arguments) generate IR for a CAst new expression, updating context.cfg() -
doCall
protected abstract void doCall(AstTranslator.WalkContext context, CAstNode call, int result, int exception, CAstNode name, int receiver, int[] arguments) generate IR for a CAst method call expression, updating context.cfg() -
topType
the most-general type for the language being translated -
exceptionType
the most-general exception type for the language being translated -
liftDeclarationsForLexicalScoping
protected boolean liftDeclarationsForLexicalScoping()lift variable declarations for lexical scoping purposes? -
isExceptionLabel
-
hasImplicitGlobals
protected boolean hasImplicitGlobals()If this returns true, new global declarations get created for any attempt to access a non-existent variable (believe it or not, JavaScript actually does this!) -
hasSpecialUndeclaredVariables
protected boolean hasSpecialUndeclaredVariables()If this returns true, then attempts to lookup non-existent names return `null' rather than tripping an assertion. This can be used when special handling is needed for built-in names. (PHP does this) -
handleUnspecifiedLiteralKey
protected void handleUnspecifiedLiteralKey()some languages let you omit initialization of certain fields when writing an object literal (e.g., PHP). This method should be overridden to handle such cases. -
doPrologue
generate prologue code for each function body -
doPrimitive
protected abstract void doPrimitive(int resultVal, AstTranslator.WalkContext context, CAstNode primitiveCall) generate IR for call modeling creation of primitive value, updating context.cfg() -
doLocalRead
get the value number for a name defined locally (i.e., within the current method) by looking up the name in context.currentScope(). Note that the caller is responsible for ensuring that name is defined in the local scope. -
doLocalWrite
protected void doLocalWrite(AstTranslator.WalkContext context, String nm, TypeReference type, int rval) add anAssignInstruction
to context.cfg() that copies rval to the value number of local nm. Note that the caller is responsible for ensuring that nm is defined in the local scope. -
doLexicallyScopedRead
protected int doLexicallyScopedRead(CAstNode node, AstTranslator.WalkContext context, String name, TypeReference type) Note that the caller is responsible for ensuring that name is defined in a lexical scope.- Parameters:
node
- the AST node representing the read
-
ignoreName
- Parameters:
name
- A variable name- Returns:
- is this name safe to overwrite, i.e. it's synthetic from the translator?
-
doLexicallyScopedWrite
protected void doLexicallyScopedWrite(AstTranslator.WalkContext context, String name, TypeReference type, int rval) Note that the caller is responsible for ensuring that name is defined in a lexical scope. -
doGlobalRead
protected int doGlobalRead(CAstNode node, AstTranslator.WalkContext context, String name, TypeReference type) generate instructions for a read of a global -
doGlobalWrite
protected void doGlobalWrite(AstTranslator.WalkContext context, String name, TypeReference type, int rval) generate instructions for a write of a global -
makeGlobalRef
creates a reference to a global named globalName. the declaring type and type of the global are both the root type. -
makeScriptScope
-
getArgumentCount
-
getArgumentNames
-
makeTypeScope
-
getCodeContext
- Overrides:
getCodeContext
in classCAstVisitor<AstTranslator.WalkContext>
-
setDefaultValue
-
translateUnaryOpcode
-
translateBinaryOpcode
-
translateConditionOpcode
-
makeNameMap
protected String[] makeNameMap(CAstEntity n, Set<AstTranslator.Scope> scopes, SSAInstruction[] insts) -
getTypeForNode
-
makeFileContext
Description copied from class:CAstVisitor
Construct a context for a File entity.- Overrides:
makeFileContext
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
c
- a visitor-specific context in which this file was visitedn
- the file entity
-
makeTypeContext
Description copied from class:CAstVisitor
Construct a context for a Type entity.- Overrides:
makeTypeContext
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
c
- a visitor-specific context in which this type was visitedn
- the type entity
-
makeCodeContext
protected AstTranslator.WalkContext makeCodeContext(AstTranslator.WalkContext context, CAstEntity n) Description copied from class:CAstVisitor
Construct a context for a Code entity.- Overrides:
makeCodeContext
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
context
- a visitor-specific context in which the code was visitedn
- the code entity
-
enterEntity
protected boolean enterEntity(CAstEntity n, AstTranslator.WalkContext context, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Enter the entity visitor.- Overrides:
enterEntity
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the entity to processcontext
- a visitor-specific context- Returns:
- true if no further processing is needed
-
visitFileEntity
protected boolean visitFileEntity(CAstEntity n, AstTranslator.WalkContext context, AstTranslator.WalkContext fileContext, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a File entity.- Overrides:
visitFileEntity
in classCAstVisitor<AstTranslator.WalkContext>
- 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
protected void leaveFileEntity(CAstEntity n, AstTranslator.WalkContext context, AstTranslator.WalkContext fileContext, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave a File entity.- Overrides:
leaveFileEntity
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the entity to processcontext
- a visitor-specific contextfileContext
- a visitor-specific context for this file
-
visitFieldEntity
protected boolean visitFieldEntity(CAstEntity n, AstTranslator.WalkContext context, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a Field entity.- Overrides:
visitFieldEntity
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the entity to processcontext
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveFieldEntity
protected void leaveFieldEntity(CAstEntity n, AstTranslator.WalkContext context, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave a Field entity.- Overrides:
leaveFieldEntity
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the entity to processcontext
- a visitor-specific context
-
visitGlobalEntity
protected boolean visitGlobalEntity(CAstEntity n, AstTranslator.WalkContext context, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a Field entity.- Overrides:
visitGlobalEntity
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the entity to processcontext
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveGlobalEntity
protected void leaveGlobalEntity(CAstEntity n, AstTranslator.WalkContext context, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave a Field entity.- Overrides:
leaveGlobalEntity
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the entity to processcontext
- a visitor-specific context
-
visitTypeEntity
protected boolean visitTypeEntity(CAstEntity n, AstTranslator.WalkContext context, AstTranslator.WalkContext typeContext, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a Type entity.- Overrides:
visitTypeEntity
in classCAstVisitor<AstTranslator.WalkContext>
- 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
protected void leaveTypeEntity(CAstEntity n, AstTranslator.WalkContext context, AstTranslator.WalkContext typeContext, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave a Type entity.- Overrides:
leaveTypeEntity
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the entity to processcontext
- a visitor-specific contexttypeContext
- a visitor-specific context for this type
-
visitFunctionEntity
protected boolean visitFunctionEntity(CAstEntity n, AstTranslator.WalkContext context, AstTranslator.WalkContext codeContext, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a Function entity.- Overrides:
visitFunctionEntity
in classCAstVisitor<AstTranslator.WalkContext>
- 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
protected void leaveFunctionEntity(CAstEntity n, AstTranslator.WalkContext context, AstTranslator.WalkContext codeContext, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave a Function entity.- Overrides:
leaveFunctionEntity
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the entity to processcontext
- a visitor-specific contextcodeContext
- a visitor-specific context for this function
-
visitMacroEntity
protected boolean visitMacroEntity(CAstEntity n, AstTranslator.WalkContext context, AstTranslator.WalkContext codeContext, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a Macro entity.- Overrides:
visitMacroEntity
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the entity to processcontext
- a visitor-specific contextcodeContext
- a visitor-specific context for this macro- Returns:
- true if no further processing is needed
-
visitScriptEntity
protected boolean visitScriptEntity(CAstEntity n, AstTranslator.WalkContext context, AstTranslator.WalkContext codeContext, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a Script entity.- Overrides:
visitScriptEntity
in classCAstVisitor<AstTranslator.WalkContext>
- 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
protected void leaveScriptEntity(CAstEntity n, AstTranslator.WalkContext context, AstTranslator.WalkContext codeContext, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave a Script entity.- Overrides:
leaveScriptEntity
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the entity to processcontext
- a visitor-specific contextcodeContext
- a visitor-specific context for this script
-
initFunctionEntity
-
closeFunctionEntity
public void closeFunctionEntity(CAstEntity n, AstTranslator.WalkContext parentContext, AstTranslator.WalkContext functionContext) -
getParameterPositions
-
makeLocalContext
Description copied from class:CAstVisitor
Construct a context for a LocalScope node.- Overrides:
makeLocalContext
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
context
- a visitor-specific context in which the local scope was visitedn
- the local scope node
-
makeSpecialParentContext
protected AstTranslator.WalkContext makeSpecialParentContext(AstTranslator.WalkContext context, CAstNode n) - Overrides:
makeSpecialParentContext
in classCAstVisitor<AstTranslator.WalkContext>
-
makeUnwindContext
protected AstTranslator.WalkContext makeUnwindContext(AstTranslator.WalkContext context, CAstNode n, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Construct a context for an Unwind node.- Overrides:
makeUnwindContext
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
context
- a visitor-specific context in which the unwind was visitedn
- the unwind node
-
processFunctionExpr
-
visitFunctionExpr
protected boolean visitFunctionExpr(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a FunctionExpr node.- Overrides:
visitFunctionExpr
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveFunctionExpr
protected void leaveFunctionExpr(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave a FunctionExpr node.- Overrides:
leaveFunctionExpr
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitFunctionStmt
protected boolean visitFunctionStmt(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a FunctionStmt node.- Overrides:
visitFunctionStmt
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveFunctionStmt
protected void leaveFunctionStmt(CAstNode n, AstTranslator.WalkContext context, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave a FunctionStmt node.- Overrides:
leaveFunctionStmt
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processcontext
- a visitor-specific context
-
visitLocalScope
protected boolean visitLocalScope(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a LocalScope node.- Overrides:
visitLocalScope
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
visitSpecialParentScope
protected boolean visitSpecialParentScope(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) - Overrides:
visitSpecialParentScope
in classCAstVisitor<AstTranslator.WalkContext>
-
leaveLocalScope
protected void leaveLocalScope(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave a LocalScope node.- Overrides:
leaveLocalScope
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
leaveSpecialParentScope
protected void leaveSpecialParentScope(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) - Overrides:
leaveSpecialParentScope
in classCAstVisitor<AstTranslator.WalkContext>
-
visitBlockExpr
protected boolean visitBlockExpr(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a BlockExpr node.- Overrides:
visitBlockExpr
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveBlockExpr
protected void leaveBlockExpr(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave a BlockExpr node.- Overrides:
leaveBlockExpr
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitBlockStmt
protected boolean visitBlockStmt(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a BlockStmt node.- Overrides:
visitBlockStmt
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveBlockStmt
protected void leaveBlockStmt(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave a BlockStmt node.- Overrides:
leaveBlockStmt
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitLoop
protected boolean visitLoop(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a Loop node.- Overrides:
visitLoop
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveLoopHeader
protected final void leaveLoopHeader(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a Loop node after processing the loop header.- Overrides:
leaveLoopHeader
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
leaveLoop
protected final void leaveLoop(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave a Loop node.- Overrides:
leaveLoop
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitGetCaughtException
protected boolean visitGetCaughtException(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a GetCaughtException node.- Overrides:
visitGetCaughtException
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveGetCaughtException
protected void leaveGetCaughtException(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave a GetCaughtException node.- Overrides:
leaveGetCaughtException
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitThis
protected boolean visitThis(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a This node.- Overrides:
visitThis
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveThis
protected void leaveThis(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave a This node.- Overrides:
leaveThis
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitSuper
protected boolean visitSuper(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a Super node.- Overrides:
visitSuper
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveSuper
protected void leaveSuper(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave a Super node.- Overrides:
leaveSuper
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitCall
protected boolean visitCall(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a Call node.- Overrides:
visitCall
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveCall
protected void leaveCall(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave a Call node.- Overrides:
leaveCall
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitVar
protected boolean visitVar(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a Var node.- Overrides:
visitVar
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveVar
protected void leaveVar(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave a Var node.- Overrides:
leaveVar
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitConstant
protected boolean visitConstant(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a Constant node.- Overrides:
visitConstant
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveConstant
protected void leaveConstant(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave a Constant node.- Overrides:
leaveConstant
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitBinaryExpr
protected boolean visitBinaryExpr(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a BinaryExpr node.- Overrides:
visitBinaryExpr
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveBinaryExpr
protected void leaveBinaryExpr(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave a BinaryExpr node.- Overrides:
leaveBinaryExpr
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitUnaryExpr
protected boolean visitUnaryExpr(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a UnaryExpr node.- Overrides:
visitUnaryExpr
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveUnaryExpr
protected void leaveUnaryExpr(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave a UnaryExpr node.- Overrides:
leaveUnaryExpr
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitArrayLength
protected boolean visitArrayLength(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit an ArrayLength node.- Overrides:
visitArrayLength
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveArrayLength
protected void leaveArrayLength(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave an ArrayLength node.- Overrides:
leaveArrayLength
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitArrayRef
protected boolean visitArrayRef(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit an ArrayRef node.- Overrides:
visitArrayRef
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveArrayRef
protected void leaveArrayRef(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave an ArrayRef node.- Overrides:
leaveArrayRef
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitDeclStmt
protected boolean visitDeclStmt(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a DeclStmt node.- Overrides:
visitDeclStmt
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveDeclStmt
protected void leaveDeclStmt(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave a DeclStmt node.- Overrides:
leaveDeclStmt
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitReturn
protected boolean visitReturn(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a Return node.- Overrides:
visitReturn
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveReturn
protected void leaveReturn(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave a Return node.- Overrides:
leaveReturn
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitIfgoto
protected boolean visitIfgoto(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit an Ifgoto node.- Overrides:
visitIfgoto
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveIfgoto
protected void leaveIfgoto(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave an Ifgoto node.- Overrides:
leaveIfgoto
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitGoto
protected boolean visitGoto(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a Goto node.- Overrides:
visitGoto
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveGoto
protected void leaveGoto(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave a Goto node.- Overrides:
leaveGoto
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitLabelStmt
protected boolean visitLabelStmt(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a LabelStmt node.- Overrides:
visitLabelStmt
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveLabelStmt
protected void leaveLabelStmt(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave a LabelStmt node.- Overrides:
leaveLabelStmt
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
processIf
protected void processIf(CAstNode n, boolean isExpr, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) -
leaveIfStmtCondition
protected final void leaveIfStmtCondition(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit an IfStmt node after processing the condition.- Overrides:
leaveIfStmtCondition
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
leaveIfStmtTrueClause
protected final void leaveIfStmtTrueClause(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit an IfStmt node after processing the true clause.- Overrides:
leaveIfStmtTrueClause
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
leaveIfStmt
protected final void leaveIfStmt(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave an IfStmt node.- Overrides:
leaveIfStmt
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
leaveIfExprCondition
protected final void leaveIfExprCondition(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit an IfExpr node after processing the condition.- Overrides:
leaveIfExprCondition
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
leaveIfExprTrueClause
protected final void leaveIfExprTrueClause(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit an IfExpr node after processing the true clause.- Overrides:
leaveIfExprTrueClause
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
leaveIfExpr
protected final void leaveIfExpr(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave an IfExpr node.- Overrides:
leaveIfExpr
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitIfStmt
protected boolean visitIfStmt(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit an IfStmt node.- Overrides:
visitIfStmt
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
visitIfExpr
protected boolean visitIfExpr(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit an IfExpr node.- Overrides:
visitIfExpr
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
visitNew
protected boolean visitNew(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a New node.- Overrides:
visitNew
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveNew
protected void leaveNew(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave a New node.- Overrides:
leaveNew
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitObjectLiteral
protected boolean visitObjectLiteral(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit an ObjectLiteral node.- Overrides:
visitObjectLiteral
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveObjectLiteralFieldInit
protected void leaveObjectLiteralFieldInit(CAstNode n, int i, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit an ObjectLiteral node after processing the {i}th field initializer.- Overrides:
leaveObjectLiteralFieldInit
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processi
- the field position that was initializedc
- a visitor-specific context
-
leaveObjectLiteral
protected void leaveObjectLiteral(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave an ObjectLiteral node.- Overrides:
leaveObjectLiteral
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitArrayLiteral
protected boolean visitArrayLiteral(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit an ArrayLiteral node.- Overrides:
visitArrayLiteral
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveArrayLiteralObject
protected void leaveArrayLiteralObject(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit an ArrayLiteral node after processing the array object.- Overrides:
leaveArrayLiteralObject
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
leaveArrayLiteralInitElement
protected void leaveArrayLiteralInitElement(CAstNode n, int i, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit an ArrayLiteral node after processing the {i}th element initializer.- Overrides:
leaveArrayLiteralInitElement
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processi
- the index that was initializedc
- a visitor-specific context
-
leaveArrayLiteral
protected void leaveArrayLiteral(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave a ArrayLiteral node.- Overrides:
leaveArrayLiteral
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitObjectRef
protected boolean visitObjectRef(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit an ObjectRef node.- Overrides:
visitObjectRef
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveObjectRef
protected void leaveObjectRef(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave an ObjectRef node.- Overrides:
leaveObjectRef
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitAssign
public boolean visitAssign(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit an Assign node. Override only this to change behavior for all assignment nodes.- Overrides:
visitAssign
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveAssign
public void leaveAssign(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave an Assign node. Override only this to change behavior for all assignment nodes.- Overrides:
leaveAssign
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
processAssignOp
-
visitArrayRefAssign
protected boolean visitArrayRefAssign(CAstNode n, CAstNode v, CAstNode a, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit an ArrayRef Assignment node after visiting the RHS.- Overrides:
visitArrayRefAssign
in classCAstVisitor<AstTranslator.WalkContext>
- 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
protected void leaveArrayRefAssign(CAstNode n, CAstNode v, CAstNode a, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit an ArrayRef Assignment node after visiting the LHS.- Overrides:
leaveArrayRefAssign
in classCAstVisitor<AstTranslator.WalkContext>
- 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, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit an ArrayRef Op/Assignment node after visiting the RHS.- Overrides:
visitArrayRefAssignOp
in classCAstVisitor<AstTranslator.WalkContext>
- 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, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit an ArrayRef Op/Assignment node after visiting the LHS.- Overrides:
leaveArrayRefAssignOp
in classCAstVisitor<AstTranslator.WalkContext>
- 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, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit an ObjectRef Assignment node after visiting the RHS.- Overrides:
visitObjectRefAssign
in classCAstVisitor<AstTranslator.WalkContext>
- 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, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit an ObjectRef Assignment node after visiting the LHS.- Overrides:
leaveObjectRefAssign
in classCAstVisitor<AstTranslator.WalkContext>
- 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, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit an ObjectRef Op/Assignment node after visiting the RHS.- Overrides:
visitObjectRefAssignOp
in classCAstVisitor<AstTranslator.WalkContext>
- 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, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit an ObjectRef Op/Assignment node after visiting the LHS.- Overrides:
leaveObjectRefAssignOp
in classCAstVisitor<AstTranslator.WalkContext>
- 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, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a BlockExpr Assignment node after visiting the RHS.- Overrides:
visitBlockExprAssign
in classCAstVisitor<AstTranslator.WalkContext>
- 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, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a BlockExpr Assignment node after visiting the LHS.- Overrides:
leaveBlockExprAssign
in classCAstVisitor<AstTranslator.WalkContext>
- 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, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a BlockExpr Op/Assignment node after visiting the RHS.- Overrides:
visitBlockExprAssignOp
in classCAstVisitor<AstTranslator.WalkContext>
- 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, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a BlockExpr Op/Assignment node after visiting the LHS.- Overrides:
leaveBlockExprAssignOp
in classCAstVisitor<AstTranslator.WalkContext>
- 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
protected boolean visitVarAssign(CAstNode n, CAstNode v, CAstNode a, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a Var Assignment node after visiting the RHS.- Overrides:
visitVarAssign
in classCAstVisitor<AstTranslator.WalkContext>
- 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
-
assignValue
protected void assignValue(CAstNode n, AstTranslator.WalkContext context, AstTranslator.Symbol ls, String nm, int rval) assign rval to nm as appropriate, depending on the scope of ls -
leaveVarAssign
protected void leaveVarAssign(CAstNode n, CAstNode v, CAstNode a, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a Var Assignment node after visiting the LHS.- Overrides:
leaveVarAssign
in classCAstVisitor<AstTranslator.WalkContext>
- 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, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a Var Op/Assignment node after visiting the RHS.- Overrides:
visitVarAssignOp
in classCAstVisitor<AstTranslator.WalkContext>
- 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, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a Var Op/Assignment node after visiting the LHS.- Overrides:
leaveVarAssignOp
in classCAstVisitor<AstTranslator.WalkContext>
- 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
protected boolean visitSwitch(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a Switch node.- Overrides:
visitSwitch
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveSwitchValue
protected final void leaveSwitchValue(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a Switch node after processing the switch value.- Overrides:
leaveSwitchValue
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
leaveSwitch
protected final void leaveSwitch(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave a Switch node.- Overrides:
leaveSwitch
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitThrow
protected boolean visitThrow(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a Throw node.- Overrides:
visitThrow
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveThrow
protected void leaveThrow(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave a Throw node.- Overrides:
leaveThrow
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitCatch
protected boolean visitCatch(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a Catch node.- Overrides:
visitCatch
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveCatch
protected void leaveCatch(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave a Catch node.- Overrides:
leaveCatch
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitUnwind
protected boolean visitUnwind(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit an Unwind node.- Overrides:
visitUnwind
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveUnwind
protected void leaveUnwind(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave an Unwind node.- Overrides:
leaveUnwind
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitTry
protected boolean visitTry(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a Try node.- Overrides:
visitTry
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveTryBlock
protected final void leaveTryBlock(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a Try node after processing the try block.- Overrides:
leaveTryBlock
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
leaveTry
protected final void leaveTry(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave a Try node.- Overrides:
leaveTry
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitEmpty
protected boolean visitEmpty(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit an Empty node.- Overrides:
visitEmpty
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveEmpty
protected void leaveEmpty(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave an Empty node.- Overrides:
leaveEmpty
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitPrimitive
protected boolean visitPrimitive(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a Primitive node.- Overrides:
visitPrimitive
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leavePrimitive
protected void leavePrimitive(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave a Primitive node.- Overrides:
leavePrimitive
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitVoid
protected boolean visitVoid(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a Void node.- Overrides:
visitVoid
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveVoid
protected void leaveVoid(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave a Void node.- Overrides:
leaveVoid
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitAssert
protected boolean visitAssert(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) - Overrides:
visitAssert
in classCAstVisitor<AstTranslator.WalkContext>
-
leaveAssert
protected void leaveAssert(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit an InstanceOf node.- Overrides:
leaveAssert
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitEachElementGet
protected boolean visitEachElementGet(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit an InstanceOf node.- Overrides:
visitEachElementGet
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveEachElementGet
protected void leaveEachElementGet(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave an FOR_EACH_ELEMENT_GET node.- Overrides:
leaveEachElementGet
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitEachElementHasNext
protected boolean visitEachElementHasNext(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave an InstanceOf node.- Overrides:
visitEachElementHasNext
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
leaveEachElementHasNext
protected void leaveEachElementHasNext(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) - Overrides:
leaveEachElementHasNext
in classCAstVisitor<AstTranslator.WalkContext>
-
visitTypeLiteralExpr
protected boolean visitTypeLiteralExpr(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit an TYPE_LITERAL_EXPR node.- Overrides:
visitTypeLiteralExpr
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveTypeLiteralExpr
protected void leaveTypeLiteralExpr(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave an TYPE_LITERAL_EXPR node.- Overrides:
leaveTypeLiteralExpr
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitIsDefinedExpr
protected boolean visitIsDefinedExpr(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) - Overrides:
visitIsDefinedExpr
in classCAstVisitor<AstTranslator.WalkContext>
-
leaveIsDefinedExpr
protected void leaveIsDefinedExpr(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave an IS_DEFINED_EXPR node.- Overrides:
leaveIsDefinedExpr
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitEcho
protected boolean visitEcho(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) - Overrides:
visitEcho
in classCAstVisitor<AstTranslator.WalkContext>
-
leaveEcho
protected void leaveEcho(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave an ECHO node.- Overrides:
leaveEcho
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
visitYield
protected boolean visitYield(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Visit a Return node.- Overrides:
visitYield
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context- Returns:
- true if no further processing is needed
-
leaveYield
protected void leaveYield(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave a Return node.- Overrides:
leaveYield
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
getIncludedEntity
-
leaveInclude
protected void leaveInclude(CAstNode n, AstTranslator.WalkContext c, CAstVisitor<AstTranslator.WalkContext> visitor) Description copied from class:CAstVisitor
Leave an INCLUDE node.- Overrides:
leaveInclude
in classCAstVisitor<AstTranslator.WalkContext>
- Parameters:
n
- the node to processc
- a visitor-specific context
-
walkEntities
-
translate
translate module, represented byCAstEntity
N- Specified by:
translate
in interfaceTranslatorToIR
-
translate
-
doIsFieldDefined
-