public class RemoveExtendedFors extends ContextVisitor
context, outer, prune, rethrowMissingDependencies
error, job, nf, ts
bypass, bypassParent
Constructor and Description |
---|
RemoveExtendedFors(Job job,
TypeSystem ts,
NodeFactory nf) |
Modifier and Type | Method and Description |
---|---|
protected NodeVisitor |
enterCall(Node n) |
protected java.lang.String |
freshName(java.lang.String desc) |
protected boolean |
isExtendedFor(Node n) |
protected Node |
leaveCall(Node parent,
Node old,
Node n,
NodeVisitor v)
Contains all of the functionality that can be done in the
leave
method, but allows SemanticExceptions to be
thrown. |
protected Expr |
makeLocal(Position pos,
LocalInstance li) |
protected Node |
translateExtForArray(ExtendedFor n,
java.util.List<java.lang.String> labels) |
addDecls, addDecls, begin, context, context, enter, enter, enterScope, leave, rethrowMissingDependencies, superEnter
catchErrors, enterCall, enterError, errorQueue, hasErrors, job, leaveCall, leaveCall, nodeFactory, typeSystem
bypass, bypass, bypassChildren, override, visitChildren
copy, finish, finish, lang, leave, override, toString, visitEdge, visitEdgeNoOverride
public RemoveExtendedFors(Job job, TypeSystem ts, NodeFactory nf)
protected NodeVisitor enterCall(Node n) throws SemanticException
enterCall
in class ErrorHandlingVisitor
SemanticException
protected Node leaveCall(Node parent, Node old, Node n, NodeVisitor v) throws SemanticException
ErrorHandlingVisitor
leave
method, but allows SemanticExceptions
to be
thrown.
This method is in addition to the leave
method,
and allows the compiler writer to write code that can throw errors
and let the Polyglot infrastructure handle the exceptions.leaveCall
in class ErrorHandlingVisitor
old
- The original state of root of the current subtree.n
- The current state of the root of the current subtree.v
- The NodeVisitor
object used to visit the children.n
.SemanticException
NodeVisitor.leave(Node, Node, NodeVisitor)
protected boolean isExtendedFor(Node n)
protected java.lang.String freshName(java.lang.String desc)
protected Node translateExtForArray(ExtendedFor n, java.util.List<java.lang.String> labels) throws SemanticException
SemanticException
protected Expr makeLocal(Position pos, LocalInstance li)