public class RemoveExtendedFors extends ContextVisitor
context, outer, prune, rethrowMissingDependencieserror, job, nf, tsbypass, 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, superEntercatchErrors, enterCall, enterError, errorQueue, hasErrors, job, leaveCall, leaveCall, nodeFactory, typeSystembypass, bypass, bypassChildren, override, visitChildrencopy, finish, finish, lang, leave, override, toString, visitEdge, visitEdgeNoOverridepublic RemoveExtendedFors(Job job, TypeSystem ts, NodeFactory nf)
protected NodeVisitor enterCall(Node n) throws SemanticException
enterCall in class ErrorHandlingVisitorSemanticExceptionprotected Node leaveCall(Node parent, Node old, Node n, NodeVisitor v) throws SemanticException
ErrorHandlingVisitorleave
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 ErrorHandlingVisitorold - 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.SemanticExceptionNodeVisitor.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
SemanticExceptionprotected Expr makeLocal(Position pos, LocalInstance li)