public final class CheckEs6ModuleFileStructure extends NodeTraversal.AbstractPreOrderCallback implements CompilerPass
Modifier and Type | Field and Description |
---|---|
static DiagnosticType |
MUST_COME_BEFORE |
Constructor and Description |
---|
CheckEs6ModuleFileStructure(AbstractCompiler compiler) |
Modifier and Type | Method and Description |
---|---|
void |
process(Node externs,
Node root)
Process the JS with root node root.
|
boolean |
shouldTraverse(NodeTraversal t,
Node n,
Node parent)
Visits a node in pre order (before visiting its children) and decides
whether this node's children should be traversed.
|
visit
public static final DiagnosticType MUST_COME_BEFORE
public CheckEs6ModuleFileStructure(AbstractCompiler compiler)
public boolean shouldTraverse(NodeTraversal t, Node n, Node parent)
NodeTraversal.Callback
Visits a node in pre order (before visiting its children) and decides
whether this node's children should be traversed. If children are
traversed, they will be visited by
NodeTraversal.Callback.visit(NodeTraversal, Node, Node)
in postorder.
Implementations can have side effects (e.g. modifying the parse tree).
shouldTraverse
in interface NodeTraversal.Callback
public void process(Node externs, Node root)
CompilerPass
process
in interface CompilerPass
externs
- Top of external JS treeroot
- Top of JS treeCopyright © 2009-2018 Google. All Rights Reserved.