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.
|
visitpublic static final DiagnosticType MUST_COME_BEFORE
public CheckEs6ModuleFileStructure(AbstractCompiler compiler)
public boolean shouldTraverse(NodeTraversal t, Node n, Node parent)
NodeTraversal.CallbackVisits 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.Callbackpublic void process(Node externs, Node root)
CompilerPassprocess in interface CompilerPassexterns - Top of external JS treeroot - Top of JS treeCopyright © 2009-2019 Google. All Rights Reserved.