Package | Description |
---|---|
com.google.javascript.jscomp |
Provides the core compiler and its public API.
|
com.google.javascript.jscomp.lint |
Modifier and Type | Interface and Description |
---|---|
interface |
HotSwapCompilerPass
Interface for compiler passes that can be used in a hot-swap fashion.
|
Modifier and Type | Class and Description |
---|---|
class |
AstValidator
This class walks the AST and validates that the structure is correct.
|
class |
CallGraph
A pass the uses a
DefinitionProvider to compute a call graph for an
AST. |
class |
CheckConformance
Provides a framework for checking code against a set of user configured
conformance rules.
|
class |
CheckEventfulObjectDisposal
Check to ensure there exists a path to dispose of each eventful object
created.
|
class |
CheckRequiresForConstructors
This pass walks the AST to create a Collection of 'new' nodes and
'goog.require' nodes.
|
class |
ClosureCheckModule
Checks that goog.module() is used correctly.
|
class |
DartSuperAccessorsPass
Converts
super getter and setter calls in order to support the output
of the Dart Dev Compiler (https://github.com/dart-lang/dev_compiler). |
class |
DeadPropertyAssignmentElimination
An optimization pass that finds and removes dead property assignments within functions.
|
class |
DefinitionUseSiteFinder
Built on top of the
NameBasedDefinitionProvider , this class additionally collects the
use sites for each definition. |
class |
Es6ConvertSuper
Converts
super.method() calls and adds constructors to any classes that lack them. |
class |
Es6ConvertSuperConstructorCalls
Converts
super() calls. |
class |
Es6ExtractClasses
Extracts ES6 classes defined in function calls to local constants.
|
class |
Es6RenameVariablesInParamLists
Renames declarations and references in function bodies to avoid shadowing
names referenced in the parameter list, in default values or computed properties.
|
class |
Es6RewriteArrowFunction
Converts ES6 arrow functions to standard anonymous ES3 functions.
|
class |
Es6RewriteBlockScopedDeclaration
Rewrite "let"s and "const"s as "var"s.
|
class |
Es6RewriteDestructuring
Rewrites ES6 destructuring patterns and default parameters to valid ES3 code.
|
class |
Es6RewriteGenerators
Converts ES6 generator functions to valid ES3 code.
|
class |
Es6SplitVariableDeclarations
Splits variable declarations that declare multiple variables into
separate declarations, if at least one of the declarations is a
destructuring declaration.
|
class |
Es6ToEs3ClassSideInheritance
Rewrites static inheritance to explicitly copy inherited properties from superclass to
subclass so that the typechecker knows the subclass has those properties.
|
class |
Es6ToEs3Converter
Converts ES6 code to valid ES5 code.
|
class |
Es6TypedToEs6Converter
Converts
Node.getDeclaredTypeExpression() to JSDocInfo.getType() type
annotations. |
class |
ExportTestFunctions
Generates goog.exportSymbol for test functions, so they can be recognized
by the test runner, even if the code is compiled.
|
class |
FieldCleanupPass
A CleanupPass implementation that will remove all field declarations on
JSTypes contributed by the original file.
|
class |
ImplicitNullabilityCheck
Warn about types in JSDoc that are implicitly nullable.
|
class |
J2clChecksPass
Performs correctness checks which are specific to J2CL-generated patterns.
|
class |
J2clClinitPrunerPass
An optimization pass to prune J2CL clinits.
|
class |
J2clConstantHoisterPass
An optimization pass for J2CL-generated code to hoist some constant assignments out clinit method
to declaration phase so they could be used by other optimization passes for static evaliation.
|
class |
J2clEqualitySameRewriterPass
An optimization pass to re-write J2CL Equality.$same.
|
class |
J2clPass
Rewrites/inlines some J2CL constructs to be more optimizable.
|
class |
J2clPropertyInlinerPass
This pass targets j2cl output.
|
class |
JsdocToEs6TypedConverter
Converts JS with types in jsdocs to an extended JS syntax that includes types.
|
class |
JsMessageVisitor
Traverses across parsed tree and finds I18N messages.
|
class |
NameBasedDefinitionProvider
Simple name-based definition gatherer that implements
DefinitionProvider . |
class |
ProcessCommonJSModules
Rewrites a CommonJS module http://wiki.commonjs.org/wiki/Modules/1.1.1
into a form that can be safely concatenated.
|
class |
RemoveSuperMethodsPass
A pass for deleting methods that only make a super call with no change in arguments.
|
class |
RewriteAsyncFunctions
Converts async functions to valid ES6 generator functions code.
|
class |
RewriteJsonToModule
Rewrites a JSON file to be a module export.
|
class |
RewritePolyfills
Injects polyfill libraries to ensure that ES6 library functions are available.
|
class |
TransformAMDToCJSModule
Rewrites an AMD module https://github.com/amdjs/amdjs-api/wiki/AMD to a
CommonJS module.
|
class |
TypeCheck
Checks the types of JS expressions against any declared type
information.
|
class |
WhitespaceWrapGoogModules
Replicates the effect of ClosureBundler in whitespace-only mode and wraps goog.modules
in goog.loadModule calls.
|
Modifier and Type | Field and Description |
---|---|
protected com.google.common.collect.Multimap<CustomPassExecutionTime,CompilerPass> |
CompilerOptions.customPasses
Custom passes
|
Modifier and Type | Method and Description |
---|---|
protected abstract CompilerPass |
PassFactory.create(AbstractCompiler compiler)
Creates a new compiler pass to be run.
|
Modifier and Type | Method and Description |
---|---|
void |
CompilerOptions.addCustomPass(CustomPassExecutionTime time,
CompilerPass customPass) |
Modifier and Type | Class and Description |
---|---|
class |
CheckArrayWithGoogObject
Lints against passing arrays to goog.object methods with the intention of
iterating over them as though with a for-in loop, which is discouraged with
arrays.
|
class |
CheckDuplicateCase
Check for duplicate case labels in a switch statement
Eg:
switch (foo) {
case 1:
case 1:
}
This is normally an indication of a programmer error.
|
class |
CheckEmptyStatements
Check for empty statements (i.e.
|
class |
CheckEnums
Check for duplicate values in enums.
|
class |
CheckInterfaces
Checks for errors related to interfaces.
|
class |
CheckJSDocStyle
Checks for various JSDoc-related style issues, such as function definitions without JsDoc, params
with no corresponding
@param annotation, coding conventions not being respected, etc. |
class |
CheckMissingSemicolon
Check for statements that should end with a semicolon according to the Google style guide.
|
class |
CheckNullableReturn
Checks when a function is annotated as returning {SomeType} (nullable)
but actually always returns {!SomeType}, i.e.
|
class |
CheckPrimitiveAsObject
Check for explicit creation of the object equivalents of primitive types
(e.g.
|
class |
CheckPrototypeProperties
Checks when a mutable property is assigned to a prototype.
|
class |
CheckRequiresAndProvidesSorted
Checks that goog.require() and goog.provide() calls are sorted alphabetically.
|
class |
CheckUnusedLabels
Check for unused labels blocks.
|
class |
CheckUselessBlocks
Check for useless blocks.
|
Copyright © 2009-2016 Google. All Rights Reserved.