Package | Description |
---|---|
com.google.javascript.jscomp |
Provides the core compiler and its public API.
|
Modifier and Type | Field and Description |
---|---|
(package private) CompilerInput |
Var.input
Input source
|
private CompilerInput |
Compiler.synthesizedExternsInput |
private CompilerInput |
Compiler.synthesizedExternsInputAtEnd |
Modifier and Type | Field and Description |
---|---|
private java.util.List<CompilerInput> |
Compiler.externs |
private java.util.List<CompilerInput> |
JSModule.inputs
Source code inputs
|
private java.util.List<CompilerInput> |
Compiler.inputs |
private java.util.Map<InputId,CompilerInput> |
Compiler.inputsById |
Modifier and Type | Method and Description |
---|---|
CompilerInput |
JSModule.getByName(java.lang.String name)
Returns the input with the given name or null if none.
|
CompilerInput |
NodeTraversal.getInput()
Gets the current input source.
|
(package private) CompilerInput |
TypedVar.getInput() |
(package private) CompilerInput |
Var.getInput() |
abstract CompilerInput |
AbstractCompiler.getInput(InputId inputId)
Looks up an input (possibly an externs input) by input id.
|
CompilerInput |
Compiler.getInput(InputId id) |
(package private) abstract CompilerInput |
AbstractCompiler.getSynthesizedExternsInput() |
(package private) CompilerInput |
Compiler.getSynthesizedExternsInput() |
(package private) abstract CompilerInput |
AbstractCompiler.getSynthesizedExternsInputAtEnd() |
(package private) CompilerInput |
Compiler.getSynthesizedExternsInputAtEnd() |
(package private) CompilerInput |
Compiler.newExternInput(java.lang.String name,
Compiler.SyntheticExternsPosition pos) |
(package private) CompilerInput |
Compiler.putCompilerInput(InputId id,
CompilerInput input) |
Modifier and Type | Method and Description |
---|---|
private java.util.Collection<CompilerInput> |
JSModuleGraph.createEntryPointInputs(DependencyOptions depOptions,
java.util.List<CompilerInput> inputs,
SortedDependencies<CompilerInput> sorter) |
private static java.util.List<CompilerInput> |
Compiler.getAllInputsFromModules(java.util.List<JSModule> modules)
Builds a single list of all module inputs.
|
(package private) java.util.List<CompilerInput> |
Compiler.getExternsForTesting() |
(package private) java.util.List<CompilerInput> |
Compiler.getExternsInOrder()
Gets the externs in the order in which they are being processed.
|
java.util.List<CompilerInput> |
JSModule.getInputs()
Gets this module's list of source code inputs.
|
java.util.Map<InputId,CompilerInput> |
Compiler.getInputsById()
Returns an unmodifiable view of the compiler inputs indexed by id.
|
(package private) java.util.List<CompilerInput> |
Compiler.getInputsForTesting() |
(package private) abstract java.util.List<CompilerInput> |
AbstractCompiler.getInputsInOrder()
Gets the inputs in the order in which they are being processed.
|
(package private) java.util.List<CompilerInput> |
Compiler.getInputsInOrder() |
private <T extends SourceFile> |
Compiler.makeCompilerInput(java.util.List<T> files,
boolean isExtern) |
java.util.List<CompilerInput> |
JSModuleGraph.manageDependencies(DependencyOptions depOptions,
java.util.List<CompilerInput> inputs)
Apply the dependency options to the list of sources, returning a new
source list re-ordering and dropping files as necessary.
|
java.util.List<CompilerInput> |
JSModuleGraph.manageDependencies(java.util.List<ModuleIdentifier> entryPoints,
java.util.List<CompilerInput> inputs)
Applies a DependencyOptions in "dependency sorting" and "dependency pruning"
mode to the given list of inputs.
|
Modifier and Type | Method and Description |
---|---|
void |
JSModule.add(CompilerInput input)
Adds a source code input to this module.
|
void |
JSModule.addAfter(CompilerInput input,
CompilerInput other)
Adds a source code input to this module directly after other.
|
(package private) void |
JSModule.addAndOverrideModule(CompilerInput input)
Adds a source code input to this module.
|
(package private) static ReferenceCollectingCallback.Reference |
ReferenceCollectingCallback.Reference.createRefForTest(CompilerInput input)
Creates a variable reference in a given script file name, used in tests.
|
(package private) Var |
TypedScope.declare(java.lang.String name,
Node nameNode,
CompilerInput input) |
(package private) Var |
Scope.declare(java.lang.String name,
Node nameNode,
CompilerInput input)
Declares a variable.
|
(package private) TypedVar |
TypedScope.declare(java.lang.String name,
Node nameNode,
JSType type,
CompilerInput input) |
(package private) TypedVar |
TypedScope.declare(java.lang.String name,
Node nameNode,
JSType type,
CompilerInput input,
boolean inferred) |
(package private) TypedVar |
TypeValidator.expectUndeclaredVariable(java.lang.String sourceName,
CompilerInput input,
Node n,
Node parent,
TypedVar var,
java.lang.String variableName,
JSType newType)
Expect that the given variable has not been declared with a type.
|
private void |
TypedScopeCreator.AbstractScopeBuilder.finishConstructorDefinition(Node n,
java.lang.String variableName,
FunctionType fnType,
TypedScope scopeToDeclareIn,
CompilerInput input,
TypedVar newVar) |
(package private) java.lang.String |
ProcessCommonJSModules.inputToModuleName(CompilerInput input) |
private URI |
ES6ModuleLoader.locate(java.lang.String name,
CompilerInput referrer) |
(package private) URI |
ES6ModuleLoader.locateCommonJsModule(java.lang.String requireName,
CompilerInput context)
Find a CommonJS module
requireName relative to context . |
(package private) URI |
ES6ModuleLoader.locateEs6Module(java.lang.String moduleName,
CompilerInput context)
Find an ES6 module
moduleName relative to context . |
(package private) URI |
ES6ModuleLoader.normalizeInputAddress(CompilerInput input)
Normalizes the address of
input and resolves it against the module roots. |
void |
SyntacticScopeCreator.RedeclarationHandler.onRedeclaration(Scope s,
java.lang.String name,
Node n,
CompilerInput input) |
void |
SyntacticScopeCreator.DefaultRedeclarationHandler.onRedeclaration(Scope s,
java.lang.String name,
Node n,
CompilerInput input) |
void |
Normalize.DuplicateDeclarationHandler.onRedeclaration(Scope s,
java.lang.String name,
Node n,
CompilerInput input)
Remove duplicate VAR declarations encountered discovered during
scope creation.
|
void |
VarCheck.RedeclarationCheckHandler.onRedeclaration(Scope s,
java.lang.String name,
Node n,
CompilerInput input) |
(package private) CompilerInput |
Compiler.putCompilerInput(InputId id,
CompilerInput input) |
void |
JSModule.remove(CompilerInput input)
Removes an input from this module.
|
private void |
RescopeGlobalSymbols.RewriteScopeCallback.replaceSymbol(Node node,
java.lang.String name,
CompilerInput input) |
Modifier and Type | Method and Description |
---|---|
private java.util.Collection<CompilerInput> |
JSModuleGraph.createEntryPointInputs(DependencyOptions depOptions,
java.util.List<CompilerInput> inputs,
SortedDependencies<CompilerInput> sorter) |
private java.util.Collection<CompilerInput> |
JSModuleGraph.createEntryPointInputs(DependencyOptions depOptions,
java.util.List<CompilerInput> inputs,
SortedDependencies<CompilerInput> sorter) |
java.util.List<CompilerInput> |
JSModuleGraph.manageDependencies(DependencyOptions depOptions,
java.util.List<CompilerInput> inputs)
Apply the dependency options to the list of sources, returning a new
source list re-ordering and dropping files as necessary.
|
java.util.List<CompilerInput> |
JSModuleGraph.manageDependencies(java.util.List<ModuleIdentifier> entryPoints,
java.util.List<CompilerInput> inputs)
Applies a DependencyOptions in "dependency sorting" and "dependency pruning"
mode to the given list of inputs.
|
(package private) void |
AbstractCommandLineRunner.printBundleTo(java.lang.Iterable<CompilerInput> inputs,
java.lang.Appendable out)
Prints all the input contents, starting with a comment that specifies
the input file name (using root-relative paths) before each file.
|
private void |
AbstractCommandLineRunner.printManifestTo(java.lang.Iterable<CompilerInput> inputs,
java.lang.Appendable out)
Prints a list of input names (using root-relative paths), delimited by
newlines, to the manifest file.
|
Constructor and Description |
---|
TypedVar(boolean inferred,
java.lang.String name,
Node nameNode,
JSType type,
TypedScope scope,
int index,
CompilerInput input) |
Var(java.lang.String name,
Node nameNode,
Scope scope,
int index,
CompilerInput input) |
Constructor and Description |
---|
ES6ModuleLoader(java.util.List<java.lang.String> moduleRoots,
java.lang.Iterable<CompilerInput> inputs)
Creates an instance of the module loader which can be used to locate ES6 and CommonJS modules.
|
GlobalVarReferenceMap(java.util.List<CompilerInput> inputs,
java.util.List<CompilerInput> externs) |
GlobalVarReferenceMap(java.util.List<CompilerInput> inputs,
java.util.List<CompilerInput> externs) |