com.google.javascript.jscomp
Class FindExportableNodes
java.lang.Object
com.google.javascript.jscomp.NodeTraversal.AbstractPostOrderCallback
com.google.javascript.jscomp.FindExportableNodes
- All Implemented Interfaces:
- NodeTraversal.Callback
public class FindExportableNodes
- extends NodeTraversal.AbstractPostOrderCallback
Records all of the symbols and properties that should be exported.
Currently applies to:
- function foo() {}
- var foo = function() {}
- foo.bar = function() {}
- var FOO = ...;
- foo.BAR = ...;
FOO = BAR = 5;
and
var FOO = BAR = 5;
are not supported because the annotation is ambigous to whether it applies
to all the variables or only the first one.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FindExportableNodes
public FindExportableNodes(AbstractCompiler compiler)
visit
public void visit(NodeTraversal t,
Node n,
Node parent)
- Description copied from interface:
NodeTraversal.Callback
Visits a node in post order (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).
getExports
public LinkedHashMap<String,FindExportableNodes.GenerateNodeContext> getExports()