polyglot.visit
Class FlattenVisitor
java.lang.Object
polyglot.visit.NodeVisitor
polyglot.visit.FlattenVisitor
- public class FlattenVisitor
- extends NodeVisitor
The FlattenVisitor flattens the AST,
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ts
protected TypeSystem ts
nf
protected NodeFactory nf
stack
protected java.util.LinkedList stack
count
protected static int count
noFlatten
protected Node noFlatten
FlattenVisitor
public FlattenVisitor(TypeSystem ts,
NodeFactory nf)
override
public Node override(Node n)
- Overrides:
override
in class NodeVisitor
newID
protected static java.lang.String newID()
enter
public NodeVisitor enter(Node n)
- When entering a BlockStatement, place a new StatementList
onto the stack
- Overrides:
enter
in class NodeVisitor
leave
public Node leave(Node old,
Node n,
NodeVisitor v)
- Flatten complex expressions within the AST
- Overrides:
leave
in class NodeVisitor