public abstract class AbstractCompiler extends Object implements SourceExcerptProvider
SourceExcerptProvider.ExcerptFormatter, SourceExcerptProvider.SourceExcerpt
Modifier and Type | Field and Description |
---|---|
protected Map<String,Object> |
annotationMap |
Constructor and Description |
---|
AbstractCompiler() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addExportedNames(Set<String> exportedVariableNames)
Adds exported names to keep track.
|
abstract void |
addInputSourceMap(String name,
SourceMapInput sourceMap)
Adds a
SourceMapInput for the given sourceFileName , to be used for error
reporting and source map combining. |
abstract void |
clearTypeIRegistry() |
abstract CodingConvention |
getCodingConvention()
Gets the current coding convention.
|
abstract com.google.javascript.jscomp.IdGenerator |
getCrossModuleIdGenerator()
Gets the id generator for cross-module motion.
|
abstract ErrorManager |
getErrorManager()
Gets the error manager.
|
abstract Set<String> |
getExportedNames()
Gets the names that have been exported.
|
abstract com.google.javascript.jscomp.FunctionNames |
getFunctionNames()
Gets the fully qualified function name and globally unique id mapping.
|
abstract CompilerInput |
getInput(InputId inputId)
Looks up an input (possibly an externs input) by input id.
|
abstract double |
getProgress() |
abstract ReverseAbstractInterpreter |
getReverseAbstractInterpreter()
Get an interpreter for type analysis.
|
abstract Node |
getRoot()
Returns the root node of the AST, which includes both externs and source.
|
abstract TypedScope |
getTopScope()
Gets the top scope.
|
abstract TypeIRegistry |
getTypeIRegistry() |
abstract JSTypeRegistry |
getTypeRegistry()
Gets a central registry of type information from the compiled JS.
|
abstract void |
report(JSError error)
Report an error or warning.
|
abstract void |
reportCodeChange()
Deprecated.
Use #reportChangeToEnclosingScope or NodeTraversal#reportCodeChange instead
|
abstract void |
setAnonymousFunctionNameMap(VariableMap functionMap)
Sets the naming map for anonymous functions
|
abstract void |
setCssNames(Map<String,Integer> newCssNames)
Sets the css names found during compilation.
|
abstract void |
setFunctionNames(com.google.javascript.jscomp.FunctionNames functionNames)
Sets the fully qualified function name and globally unique id mapping.
|
abstract void |
setIdGeneratorMap(String serializedIdMappings)
Sets the id generator for cross-module motion.
|
abstract void |
setPropertyMap(VariableMap propertyMap)
Sets the property renaming map
|
abstract void |
setStringMap(VariableMap stringMap)
Sets the string replacement map
|
abstract void |
setVariableMap(VariableMap variableMap)
Sets the variable renaming map
|
abstract String |
toSource()
Prints a node to source code.
|
abstract String |
toSource(Node root)
Prints a node to source code.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSourceLine, getSourceMapping, getSourceRegion
public abstract CompilerInput getInput(InputId inputId)
public abstract void addExportedNames(Set<String> exportedVariableNames)
public abstract Set<String> getExportedNames()
public abstract void setVariableMap(VariableMap variableMap)
public abstract void setPropertyMap(VariableMap propertyMap)
public abstract void setStringMap(VariableMap stringMap)
public abstract void setFunctionNames(com.google.javascript.jscomp.FunctionNames functionNames)
public abstract com.google.javascript.jscomp.FunctionNames getFunctionNames()
public abstract void setCssNames(Map<String,Integer> newCssNames)
public abstract void setIdGeneratorMap(String serializedIdMappings)
public abstract com.google.javascript.jscomp.IdGenerator getCrossModuleIdGenerator()
public abstract void setAnonymousFunctionNameMap(VariableMap functionMap)
public abstract JSTypeRegistry getTypeRegistry()
public abstract TypeIRegistry getTypeIRegistry()
public abstract void clearTypeIRegistry()
public abstract TypedScope getTopScope()
public abstract void report(JSError error)
public abstract CodingConvention getCodingConvention()
@Deprecated public abstract void reportCodeChange()
public abstract String toSource()
public abstract ReverseAbstractInterpreter getReverseAbstractInterpreter()
public abstract ErrorManager getErrorManager()
public abstract Node getRoot()
public abstract double getProgress()
public abstract void addInputSourceMap(String name, SourceMapInput sourceMap)
SourceMapInput
for the given sourceFileName
, to be used for error
reporting and source map combining.Copyright © 2009-2017 Google. All Rights Reserved.