public final class ClosureCheckModule extends NodeTraversal.AbstractModuleCallback implements HotSwapCompilerPass
Note that this file only does checks that can be done per-file. Whole program checks happen
during goog.module rewriting, in ClosureRewriteModule.
| Modifier and Type | Field and Description |
|---|---|
static DiagnosticType |
JSDOC_REFERENCE_TO_SHORT_IMPORT_BY_LONG_NAME_INCLUDING_SHORT_NAME |
static DiagnosticType |
REFERENCE_TO_SHORT_IMPORT_BY_LONG_NAME_INCLUDING_SHORT_NAME |
compiler| Constructor and Description |
|---|
ClosureCheckModule(AbstractCompiler compiler,
ModuleMetadataMap moduleMetadataMap) |
| Modifier and Type | Method and Description |
|---|---|
void |
enterModule(ModuleMetadataMap.ModuleMetadata currentModule,
Node moduleScopeRoot) |
void |
exitModule(ModuleMetadataMap.ModuleMetadata currentModule,
Node moduleScopeRoot) |
void |
hotSwapScript(Node scriptRoot,
Node originalRoot)
Process the JS with root node root.
|
void |
process(Node externs,
Node root)
Process the JS with root node root.
|
protected void |
visit(NodeTraversal t,
Node n,
ModuleMetadataMap.ModuleMetadata currentModule,
Node moduleScopeRoot) |
shouldTraverse, shouldTraverse, visitpublic static final DiagnosticType REFERENCE_TO_SHORT_IMPORT_BY_LONG_NAME_INCLUDING_SHORT_NAME
public static final DiagnosticType JSDOC_REFERENCE_TO_SHORT_IMPORT_BY_LONG_NAME_INCLUDING_SHORT_NAME
public ClosureCheckModule(AbstractCompiler compiler, ModuleMetadataMap moduleMetadataMap)
public void process(Node externs, Node root)
CompilerPassprocess in interface CompilerPassexterns - Top of external JS treeroot - Top of JS treepublic void hotSwapScript(Node scriptRoot, Node originalRoot)
HotSwapCompilerPasshotSwapScript in interface HotSwapCompilerPassscriptRoot - Root node corresponding to the file that is modified,
should be of type Token.SCRIPT.originalRoot - Root node corresponding to the original version of the
file that is modified. Should be of type token.SCRIPT.public void enterModule(ModuleMetadataMap.ModuleMetadata currentModule, Node moduleScopeRoot)
enterModule in class NodeTraversal.AbstractModuleCallbackpublic void exitModule(ModuleMetadataMap.ModuleMetadata currentModule, Node moduleScopeRoot)
exitModule in class NodeTraversal.AbstractModuleCallbackprotected void visit(NodeTraversal t, Node n, @Nullable ModuleMetadataMap.ModuleMetadata currentModule, @Nullable Node moduleScopeRoot)
visit in class NodeTraversal.AbstractModuleCallbackCopyright © 2009-2020 Google. All Rights Reserved.