private class ExportTestFunctions.ExportTestFunctionsNodes extends NodeTraversal.AbstractShallowCallback
| Modifier | Constructor and Description |
|---|---|
private |
ExportTestFunctionsNodes() |
| Modifier and Type | Method and Description |
|---|---|
private boolean |
isCallTargetQName(Node n,
java.lang.String qname) |
private boolean |
isNameDeclaredFunction(Node node)
Whether node corresponds to a function expression declared with var, let
or const which is of the form:
|
private void |
rewriteMemberDefInObjLit(Node memberDef,
Node objLit) |
void |
visit(NodeTraversal t,
Node n,
Node parent)
Visits a node in postorder (after its children have been visited).
|
shouldTraversepublic void visit(NodeTraversal t, Node n, Node parent)
NodeTraversal.CallbackVisits 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 boolean isCallTargetQName(Node n, java.lang.String qname)
private boolean isNameDeclaredFunction(Node node)
var/let/const functionName = function() {
// Implementation
};
This has the AST structure VAR/LET/CONST -> NAME -> FUNCTIONnode -