static class PrepareAst.PrepareAnnotations extends NodeTraversal.AbstractPostOrderCallback
Constructor and Description |
---|
PrepareAnnotations() |
Modifier and Type | Method and Description |
---|---|
private static void |
annotateCalls(Node n)
There are two types of calls we are interested in calls without explicit
"this" values (what we are call "free" calls) and direct call to eval.
|
void |
visit(NodeTraversal t,
Node n,
Node parent)
Visits a node in postorder (after its children have been visited).
|
shouldTraverse
public void visit(NodeTraversal t, Node n, Node parent)
NodeTraversal.Callback
Visits a node in postorder (after its children have been visited).
A node is visited only if all its parents should be traversed
(NodeTraversal.Callback.shouldTraverse(NodeTraversal, Node, Node)
).
Implementations can have side effects (e.g. modifying the parse tree).
private static void annotateCalls(Node n)