public class ExtendedFor_c extends Loop_c implements ExtendedFor
Loop.Instance
Modifier and Type | Field and Description |
---|---|
protected LocalDecl |
decl
Loop body
|
protected Expr |
expr |
exceptions, reachable
Constructor and Description |
---|
ExtendedFor_c(Position pos,
LocalDecl decl,
Expr expr,
Stmt body) |
Modifier and Type | Method and Description |
---|---|
<T> java.util.List<T> |
acceptCFG(CFGBuilder<?> v,
java.util.List<T> succs)
Visit this term in evaluation order, calling v.edge() for each successor
in succs, if data flows on that edge.
|
Term |
continueTarget()
Target of a continue statement in the loop body.
|
LocalDecl |
decl() |
ExtendedFor |
decl(LocalDecl decl) |
protected <N extends ExtendedFor_c> |
decl(N n,
LocalDecl decl) |
Context |
enterScope(Context c)
Push a new scope upon entering this node, and add any declarations to the
context that should be in scope when visiting children of this node.
|
Expr |
expr() |
ExtendedFor |
expr(Expr expr) |
protected <N extends ExtendedFor_c> |
expr(N n,
Expr expr) |
Term |
firstChild()
Return the first direct subterm performed when evaluating this term.
|
void |
prettyPrint(CodeWriter w,
PrettyPrinter tr)
Pretty-print the AST using the given
CodeWriter . |
protected <N extends ExtendedFor_c> |
reconstruct(N n,
LocalDecl decl,
Expr expr)
Reconstruct the statement.
|
Node |
typeCheck(TypeChecker tc)
Type check the AST.
|
Node |
visitChildren(NodeVisitor v)
Visit the children of the node.
|
body, body, body, cond, cond, cond, condIsConstant, condIsConstantFalse, condIsConstantTrue, reconstruct
exceptionCheck, exceptions, exceptions, exceptions, extRewrite, listChild, reachable, reachable, reachable
addDecls, buildTypes, buildTypesEnter, checkConstants, childExpectedType, copy, copy, copy, copyIfNeeded, del, del, disambiguate, disambiguateEnter, disambiguateOverride, dump, dump, dump, dump, dump, enterChildScope, error, error, error, exceptionCheckEnter, ext, ext, ext, ext, extRewriteEnter, isDisambiguated, isTypeChecked, lang, position, position, position, prettyPrint, prettyPrint, prettyPrint, prettyPrint, print, printBlock, printSubStmt, throwTypes, toString, translate, typeCheckEnter, typeCheckOverride, visit, visitChild, visitEdge, visitList
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
exceptions, exceptions, reachable, reachable
del, del, dump, error, error, ext, ext, ext, ext, isDisambiguated, isTypeChecked, position, position, visit, visitEdge
addDecls, buildTypes, buildTypesEnter, checkConstants, childExpectedType, copy, copy, disambiguate, disambiguateEnter, disambiguateOverride, dump, dump, dump, dump, enterChildScope, exceptionCheck, exceptionCheckEnter, extRewrite, extRewriteEnter, lang, prettyPrint, prettyPrint, prettyPrint, prettyPrint, throwTypes, translate, typeCheckEnter, typeCheckOverride, visitChild, visitList
public LocalDecl decl()
decl
in interface ExtendedFor
public ExtendedFor decl(LocalDecl decl)
decl
in interface ExtendedFor
protected <N extends ExtendedFor_c> N decl(N n, LocalDecl decl)
public Expr expr()
expr
in interface ExtendedFor
public ExtendedFor expr(Expr expr)
expr
in interface ExtendedFor
protected <N extends ExtendedFor_c> N expr(N n, Expr expr)
protected <N extends ExtendedFor_c> N reconstruct(N n, LocalDecl decl, Expr expr)
public Node visitChildren(NodeVisitor v)
NodeOps
visitChildren
in interface NodeOps
visitChildren
in class Node_c
v
- The visitor that will traverse/rewrite the AST.this
.public Context enterScope(Context c)
Node_c
enterScope
in interface NodeOps
enterScope
in class Node_c
c
- the current Context
Context
to be used for visiting this node.public Node typeCheck(TypeChecker tc) throws SemanticException
NodeOps
leave()
method of the
visitor. The method should perform work that should be done
after visiting the children of the node. The method may return
this
or a new copy of the node which will be
installed as a child of the node's parent.typeCheck
in interface NodeOps
typeCheck
in class Node_c
tc
- The type checking visitor.SemanticException
public Term firstChild()
TermOps
firstChild
in interface TermOps
firstChild
in class Term_c
public <T> java.util.List<T> acceptCFG(CFGBuilder<?> v, java.util.List<T> succs)
TermOps
public Term continueTarget()
LoopOps
continueTarget
in interface LoopOps
public void prettyPrint(CodeWriter w, PrettyPrinter tr)
Node_c
CodeWriter
.prettyPrint
in interface NodeOps
prettyPrint
in class Node_c
w
- The code writer to which to write.tr
- The pretty printer. This is not a visitor.