Package | Description |
---|---|
com.google.javascript.jscomp |
Provides the core compiler and its public API.
|
com.google.javascript.jscomp.lint |
Modifier and Type | Class and Description |
---|---|
class |
Compiler
Compiler (and the other classes in this package) does the following:
parses JS code
checks for undefined variables
performs optimizations such as constant folding and constants inlining
renames variables (to short names)
outputs compact JavaScript code
External variables are declared in 'externs' files.
|
Modifier and Type | Method and Description |
---|---|
AbstractCompiler |
NodeTraversal.getCompiler() |
Modifier and Type | Method and Description |
---|---|
Node |
SyntheticAst.getAstRoot(AbstractCompiler compiler) |
Node |
JsAst.getAstRoot(AbstractCompiler compiler) |
Node |
SourceAst.getAstRoot(AbstractCompiler compiler)
Gets the root node of the AST for the source file this represents.
|
Node |
CompilerInput.getAstRoot(AbstractCompiler compiler) |
void |
CompilerInput.setCompiler(AbstractCompiler compiler)
Sets an abstract compiler for doing parsing.
|
static void |
NodeTraversal.traverse(AbstractCompiler compiler,
Node root,
NodeTraversal.Callback cb)
Traverses a node recursively.
|
static void |
NodeTraversal.traverseChangedFunctions(AbstractCompiler compiler,
NodeTraversal.FunctionCallback callback)
Traversal for passes that work only on changed functions.
|
static void |
NodeTraversal.traverseRoots(AbstractCompiler compiler,
List<Node> roots,
NodeTraversal.Callback cb)
Traverses a list of node trees.
|
static void |
NodeTraversal.traverseRoots(AbstractCompiler compiler,
NodeTraversal.Callback cb,
Node... roots) |
static void |
NodeUtil.verifyScopeChanges(Map<Node,Node> map,
Node main,
boolean verifyUnchangedNodes,
AbstractCompiler compiler)
Checks that the scope roots marked as changed have indeed changed
|
void |
NodeTraversal.FunctionCallback.visit(AbstractCompiler compiler,
Node fnRoot) |
Constructor and Description |
---|
AstValidator(AbstractCompiler compiler) |
AstValidator(AbstractCompiler compiler,
AstValidator.ViolationHandler handler) |
CallGraph(AbstractCompiler compiler)
Creates a call graph object support both forward and backward lookups.
|
CallGraph(AbstractCompiler compiler,
boolean computeForwardGraph,
boolean computeBackwardGraph)
Creates a call graph object supporting the specified lookups.
|
CheckEventfulObjectDisposal(AbstractCompiler compiler,
CheckEventfulObjectDisposal.DisposalCheckingPolicy checkingPolicy) |
Es6HandleDefaultParameters(AbstractCompiler compiler) |
Es6RewriteGenerators(AbstractCompiler compiler) |
Es6RewriteLetConst(AbstractCompiler compiler) |
Es6SplitVariableDeclarations(AbstractCompiler compiler) |
Es6ToEs3ClassSideInheritance(AbstractCompiler compiler) |
Es6ToEs3Converter(AbstractCompiler compiler) |
FieldCleanupPass(AbstractCompiler compiler) |
NodeTraversal(AbstractCompiler compiler,
NodeTraversal.Callback cb)
Creates a node traversal using the specified callback interface.
|
NodeTraversal(AbstractCompiler compiler,
NodeTraversal.Callback cb,
com.google.javascript.jscomp.ScopeCreator scopeCreator)
Creates a node traversal using the specified callback interface
and the scope creator.
|
TemplateAstMatcher(AbstractCompiler compiler,
Node templateFunctionNode)
Constructs this matcher with a Function node that serves as the template
to match all other nodes against.
|
TypeCheck(AbstractCompiler compiler,
ReverseAbstractInterpreter reverseInterpreter,
JSTypeRegistry typeRegistry,
CheckLevel reportMissingOverride) |
TypeCheck(AbstractCompiler compiler,
ReverseAbstractInterpreter reverseInterpreter,
JSTypeRegistry typeRegistry,
Scope topScope,
com.google.javascript.jscomp.MemoizedScopeCreator scopeCreator,
CheckLevel reportMissingOverride) |
Constructor and Description |
---|
CheckNullableReturn(AbstractCompiler compiler) |
Copyright © 2009-2014 Google. All Rights Reserved.