polyglot.visit
Class AlphaRenamer
java.lang.Object
polyglot.visit.NodeVisitor
polyglot.visit.AlphaRenamer
- public class AlphaRenamer
- extends NodeVisitor
The AlphaRenamer
runs over the AST and alpha-renames any local
variable declarations that it encounters.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
nf
protected NodeFactory nf
setStack
protected java.util.Stack setStack
renamingMap
protected java.util.Map renamingMap
freshVars
protected java.util.Set freshVars
AlphaRenamer
public AlphaRenamer(NodeFactory nf)
- Creates a visitor for alpha-renaming locals.
- Parameters:
nf
- The node factory to be used when generating new nodes.
enter
public NodeVisitor enter(Node n)
- Overrides:
enter
in class NodeVisitor
leave
public Node leave(Node old,
Node n,
NodeVisitor v)
- Overrides:
leave
in class NodeVisitor