polyglot.visit
Class AddMemberVisitor
java.lang.Object
polyglot.visit.NodeVisitor
polyglot.visit.HaltingVisitor
polyglot.visit.ErrorHandlingVisitor
polyglot.visit.ContextVisitor
polyglot.visit.AddMemberVisitor
- All Implemented Interfaces:
- java.lang.Cloneable, Copy
public class AddMemberVisitor
- extends ContextVisitor
Visitor which traverses the AST constructing type objects.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AddMemberVisitor
public AddMemberVisitor(Job job,
TypeSystem ts,
NodeFactory nf)
enterCall
protected NodeVisitor enterCall(Node n)
throws SemanticException
- Overrides:
enterCall
in class ErrorHandlingVisitor
- Throws:
SemanticException
leaveCall
protected Node leaveCall(Node old,
Node n,
NodeVisitor v)
throws SemanticException
- Description copied from class:
ErrorHandlingVisitor
- Contains all of the functionality that can be done in the
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.
- Overrides:
leaveCall
in class ErrorHandlingVisitor
- Parameters:
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.
- Returns:
- The final result of the traversal of the tree rooted at
n
.
- Throws:
SemanticException
- See Also:
NodeVisitor.leave(Node, Node, NodeVisitor)