Package | Description |
---|---|
com.google.javascript.jscomp |
Provides the core compiler and its public API.
|
com.google.javascript.jscomp.lint | |
com.google.javascript.refactoring |
Modifier and Type | Interface and Description |
---|---|
static interface |
NodeTraversal.ScopedCallback
Callback that also knows about scope changes
|
Modifier and Type | Class and Description |
---|---|
private class |
AmbiguateProperties.ProcessProperties
Finds all property references, recording the types on which they occur.
|
private class |
AnalyzePrototypeProperties.ProcessExternProperties |
private class |
AnalyzePrototypeProperties.ProcessProperties |
(package private) class |
AngularPass
Compiler pass for AngularJS-specific needs.
|
(package private) class |
AnonymousFunctionNamingCallback
Visitor that performs naming operations on anonymous functions by
means of the FunctionNamer interface.
|
private class |
ChainCalls.GatherCallSites |
private class |
ChainCalls.GatherFunctions
Determines whether a function always returns this.
|
(package private) class |
CheckAccessControls
A compiler pass that checks that the programmer has obeyed all the access
control restrictions indicated by JSDoc annotations, like
@private and @deprecated . |
class |
CheckConformance
Provides a framework for checking code against a set of user configured
conformance rules.
|
(package private) class |
CheckDebuggerStatement
CheckDebuggerStatement checks for the presence of the "debugger"
statement in JavaScript code. |
private class |
CheckEventfulObjectDisposal.ComputeEventizeTraversal |
private class |
CheckEventfulObjectDisposal.Traversal |
(package private) class |
CheckGlobalThis
Checks for certain uses of the
this keyword that are considered
unsafe because they are likely to reference the global this object
unintentionally. |
(package private) class |
CheckJSDoc
Checks for misplaced, misused or deprecated JSDoc annotations.
|
(package private) class |
CheckMissingGetCssName
Ensures string literals matching certain patterns are only used as
goog.getCssName parameters.
|
(package private) class |
CheckMissingReturn
Checks functions for missing return statements.
|
private class |
CheckProvides.CheckProvidesCallback |
(package private) class |
CheckRegExp
Look for references to the global RegExp object that would cause
regular expressions to be unoptimizable, and checks that regular expressions
are syntactically valid.
|
(package private) class |
CheckRequiresForConstructors
This pass walks the AST to create a Collection of 'new' nodes and
'goog.require' nodes.
|
(package private) class |
CheckSideEffects
Checks for non side effecting statements such as
|
private class |
CheckSideEffects.GetNoSideEffectExterns
Get fully qualified function names which are marked
with @nosideeffects
TODO(ChadKillingsworth) Add support for object literals
|
(package private) static class |
CheckSideEffects.StripProtection
Remove side-effect sync functions.
|
(package private) class |
CheckSuspiciousCode
Checks for common errors, such as misplaced semicolons:
|
(package private) class |
CheckUnreachableCode
Use
ControlFlowGraph and GraphReachability to inform user
about unreachable code. |
(package private) class |
CheckUnusedPrivateProperties
This pass looks for properties that are never read.
|
class |
ClosureCheckModule
Checks that goog.module() is used correctly.
|
private class |
ClosureCodeRemoval.FindAbstractMethods
Identifies all assignments of the abstract method to a variable.
|
private class |
ClosureCodeRemoval.FindAssertionCalls
Identifies all assertion calls.
|
private class |
ClosureOptimizePrimitives.FindObjectCreateCalls
Identifies all calls to goog.object.create.
|
(package private) class |
ClosureRewriteClass
Rewrites "goog.defineClass" into a form that is suitable for
type checking and dead code elimination.
|
(package private) class |
ClosureRewriteModule
Process aliases in goog.modules.
|
(package private) class |
CoalesceVariableNames
Reuse variable names if possible.
|
private static class |
CoalesceVariableNames.CombinedLiveRangeChecker
A simple wrapper calls to call two AbstractCfgNodeTraversalCallback
callback during the same traversal.
|
private static class |
CoalesceVariableNames.LiveRangeChecker |
private class |
CollapseAnonymousFunctions.Callback |
private class |
CollapseVariableDeclarations.GatherCollapses
Gathers all of the variable declarations / assignments that should be
collapsed into one.
|
(package private) class |
CombinedCompilerPass
A compiler pass combining multiple
NodeTraversal.Callback
and NodeTraversal.ScopedCallback objects. |
(package private) class |
ConstCheck
Verifies that constants are only assigned a value once.
|
(package private) class |
ConstParamCheck
Enforces that invocations of the method
goog.string.Const.from are
done with an argument which is a string literal. |
(package private) class |
ControlFlowAnalysis
This is a compiler pass that computes a control flow graph.
|
static class |
ControlFlowGraph.AbstractCfgNodeTraversalCallback
Abstract callback to visit a control flow graph node without going into
subtrees of the node that are also represented by other
control flow graph nodes.
|
(package private) class |
ConvertToDottedProperties
Converts property accesses from quoted string syntax to dot syntax, where
possible.
|
(package private) class |
CoverageInstrumentationCallback
This class implements a traversal to instrument an AST for code coverage.
|
private class |
CreateSyntheticBlocks.Callback |
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). |
(package private) class |
DeadAssignmentsElimination
Removes local variable assignments that are useless based on information from
LiveVariablesAnalysis . |
(package private) class |
DeclaredGlobalExternsOnWindow
A compiler pass to normalize externs by declaring global names on
the "window" object, if it is declared in externs.
|
(package private) class |
Denormalize
The goal with this pass is to reverse the simplifications done in the
normalization pass that are not handled by other passes (such as
CollapseVariableDeclarations) to avoid making the resulting code larger.
|
(package private) class |
DisambiguatePrivateProperties
Disambiguate properties by file, when they are private by naming convention.
|
private class |
DisambiguateProperties.FindExternProperties
Finds all properties defined in the externs file and sets them as
ineligible for renaming from the type on which they are defined.
|
private class |
DisambiguateProperties.FindRenameableProperties
Traverses the tree, building a map from field names to Nodes for all
fields that can be renamed.
|
class |
Es6ConvertSuper
Converts
super nodes. |
(package private) class |
Es6ExternsCheck
Checks to make sure the required ES6 externs are present.
|
(package private) class |
Es6RenameReferences
Renames references in code and JSDoc when necessary.
|
class |
Es6RenameVariablesInParamLists
Renames declarations and references in function bodies to avoid shadowing
names referenced in the parameter list, in default values or computed properties.
|
private class |
Es6RenameVariablesInParamLists.CollectReferences
Collects all references in a naive way.
|
class |
Es6RewriteArrowFunction
Converts ES6 arrow functions to standard anonymous ES3 functions.
|
private static class |
Es6RewriteArrowFunction.UpdateThisAndArgumentsReferences |
class |
Es6RewriteBlockScopedDeclaration
Rewrite "let"s and "const"s as "var"s.
|
private class |
Es6RewriteBlockScopedDeclaration.CollectUndeclaredNames
Record undeclared names and aggressively rename possible references to them.
|
private class |
Es6RewriteBlockScopedDeclaration.LoopClosureTransformer
Transforms let/const declarations captured by loop closures.
|
private class |
Es6RewriteBlockScopedDeclaration.RewriteBlockScopedFunctionDeclaration |
class |
Es6RewriteDestructuring
Rewrites ES6 destructuring patterns and default parameters to valid ES3 code.
|
class |
Es6RewriteGenerators
Converts ES6 generator functions to valid ES3 code.
|
private static class |
Es6RewriteGenerators.ControlExitsCheck |
private class |
Es6RewriteGenerators.DecomposeYields
Decomposes expressions with yields inside of them to equivalent
sequence of expressions in which all non-statement yields are
of the form:
|
class |
Es6SplitVariableDeclarations
Splits variable declarations that declare multiple variables into
separate declarations, if at least one of the declarations is a
destructuring declaration.
|
private class |
Es6ToEs3ClassSideInheritance.FindStaticMembers |
class |
Es6ToEs3Converter
Converts ES6 code to valid ES5 code.
|
private class |
Es6ToEs3Converter.CheckClassAssignments |
class |
Es6TypedToEs6Converter
Converts
Node.getDeclaredTypeExpression() to JSDocInfo.getType() type
annotations. |
private class |
Es6TypedToEs6Converter.ScanNamespaces |
(package private) class |
ExpandJqueryAliases
Replace known jQuery aliases and methods with standard
conventions so that the compiler recognizes them.
|
(package private) static class |
ExpandJqueryAliases.FindCallbackArgumentReferences
Given a jQuery.expandedEach callback function, traverse it and collect any
references to its parameter names.
|
private class |
ExportTestFunctions.ExportTestFunctionsNodes |
(package private) class |
ExternExportsPass
Creates an externs file containing all exported symbols and properties
for later consumption.
|
private class |
ExtractPrototypeMemberDeclarations.GatherExtractionInfo
Collects all the possible extraction instances in a node traversal.
|
(package private) static class |
FieldCleanupPass.QualifiedNameSearchTraversal
Search for fields to cleanup by looking for nodes in the tree which are
root nodes of qualified names and getting the final token of the qualified
name as a candidate field.
|
(package private) class |
FindExportableNodes
Records all of the symbols and properties that should be exported.
|
(package private) class |
FlowSensitiveInlineVariables
Inline variables when possible.
|
private class |
FlowSensitiveInlineVariables.GatherCandiates
Gathers a list of possible candidates for inlining based only on
information from
MustBeReachingVariableDef . |
private static class |
FunctionNames.FunctionListExtractor |
private class |
FunctionRewriter.ReductionGatherer
Gathers a list of reductions to apply later by doing an in-order
AST traversal.
|
(package private) class |
GatherExternProperties
Gathers property names defined in externs.
|
(package private) class |
GatherRawExports
External references of the form: "window['xx']" indicate names that must
be reserved when variable renaming to avoid conflicts.
|
(package private) class |
GatherSideEffectSubexpressionsCallback
Callback that gathers subexpressions that may have side effects
and appends copies of those subexpressions to the replacements
list.
|
private class |
GlobalNamespace.BuildGlobalNamespace
Builds a tree representation of the global namespace.
|
private class |
GlobalTypeInfo.CollectNamedTypes
Collects names of classes, interfaces, namespaces, typedefs and enums.
|
private class |
GlobalTypeInfo.ProcessScope |
class |
ImplicitNullabilityCheck
Warn about types in JSDoc that are implicitly nullable.
|
(package private) class |
InferJSDocInfo
Set the JSDocInfo on all types.
|
private class |
InlineAliases.AliasesCollector |
private class |
InlineAliases.AliasesInliner |
private static class |
InlineFunctions.CallVisitor
Visit call sites for functions in functionMap.
|
private class |
InlineFunctions.FindCandidateFunctions
Find functions that might be inlined.
|
private class |
InlineFunctions.FindCandidatesReferences
Find references to functions that are inlinable.
|
(package private) class |
InlineProperties.GatherCandidates |
(package private) class |
InlineProperties.ReplaceCandidates |
private class |
InlineSimpleMethods.InlineTrivialAccessors
For each method call, see if it is a candidate for inlining.
|
private class |
InstrumentFunctions.InstrumentCallback |
private class |
InstrumentFunctions.InstrumentReturns
Traverse a function's body by instrument return sites by
inserting calls to
reportFunctionExitName . |
private static class |
InstrumentFunctions.RemoveCallback
The application must refer to these variables to output them so the
application must also declare these variables for the first
VarCheck pass. |
(package private) class |
InvocationsCallback
Traversal callback that finds method invocations of the form
|
private class |
J2clPass.ClassStaticFunctionsInliner.FunctionDefsCollector |
private class |
J2clPass.ClassStaticFunctionsInliner.StaticCallInliner |
private class |
J2clPropertyInlinerPass.StaticFieldGetterSetterInliner.DetermineInlinableProperties |
private class |
J2clPropertyInlinerPass.StaticFieldGetterSetterInliner.GatherJ2CLClassGetterSetters
This class traverses the ast and gathers get and set methods contained in
Object.defineProperties nodes.
|
private class |
J2clPropertyInlinerPass.StaticFieldGetterSetterInliner.InlinePropertiesPass
Look for accesses of j2cl properties and assignments to j2cl properties.
|
class |
JsdocToEs6TypedConverter
Converts JS with types in jsdocs to an extended JS syntax that includes types.
|
private class |
JsMessageExtractor.ExtractMessagesVisitor
Visitor that collects messages.
|
class |
JsMessageVisitor
Traverses across parsed tree and finds I18N messages.
|
(package private) class |
LineNumberCheck
A simple pass to ensure that all AST nodes have line numbers,
an that the line numbers are monotonically increasing.
|
(package private) class |
MakeDeclaredNamesUnique
Find all Functions, VARs, and Exception names and make them
unique.
|
(package private) static class |
MakeDeclaredNamesUnique.ContextualRenameInverter
Inverts the transformation by
MakeDeclaredNamesUnique.ContextualRenamer , when possible. |
private class |
MarkNoSideEffectCalls.GatherNoSideEffectFunctions
Gather function nodes that have @nosideeffects annotations.
|
private class |
MarkNoSideEffectCalls.SetNoSideEffectCallProperty
Set the no side effects property for CALL and NEW nodes that
refer to function names that are known to have no side effects.
|
private class |
MethodCompilerPass.GatherSignatures
Gather signatures from the source to be compiled.
|
private class |
MethodCompilerPass.GetExternMethods
Gathers methods from the externs file.
|
(package private) class |
MinimizeExitPoints
Transform the structure of the AST so that the number of explicit exits
are minimized and instead flows to implicit exits conditions.
|
(package private) class |
MoveFunctionDeclarations
Moves top-level function declarations to the top.
|
private class |
NameAnalyzer.FindDeclarationsAndSetters
Identifies all declarations of global names and setter statements
affecting global symbols (assignments to global names).
|
private class |
NameAnalyzer.FindDependencyScopes
Identifies all dependency scopes.
|
private class |
NameAnalyzer.FindReferences
Identifies all references between global names.
|
private class |
NameAnalyzer.HoistVariableAndFunctionDeclarations
Create JsName objects for variable and function declarations in
the global scope before computing name references.
|
private class |
NameAnalyzer.ProcessExternals
Walk through externs and mark nodes as externally declared if declared
|
private class |
NameReferenceGraphConstruction.Traversal |
static class |
NodeTraversal.AbstractNodeTypePruningCallback
Abstract callback to visit a pruned set of nodes.
|
static class |
NodeTraversal.AbstractPostOrderCallback
Abstract callback to visit all nodes in postorder.
|
static class |
NodeTraversal.AbstractPreOrderCallback
Abstract callback to visit all nodes in preorder.
|
static class |
NodeTraversal.AbstractScopedCallback
Abstract scoped callback to visit all nodes in postorder.
|
static class |
NodeTraversal.AbstractShallowCallback
Abstract callback to visit all nodes but not traverse into function
bodies.
|
static class |
NodeTraversal.AbstractShallowStatementCallback
Abstract callback to visit all structure and statement nodes but doesn't
traverse into functions or expressions.
|
private static class |
Normalize.FindExposeAnnotations
Find all the @expose annotations.
|
(package private) static class |
Normalize.NormalizeStatements
Simplify the AST:
- VAR declarations split, so they represent exactly one child
declaration.
|
(package private) static class |
Normalize.PropagateConstantAnnotationsOverVars
Propagate constant annotations over the Var graph.
|
private class |
Normalize.RewriteExposedProperties
Rewrite all exposed properties in [] form.
|
private static class |
Normalize.ScopeTicklingCallback
A simple class that causes scope to be created.
|
(package private) static class |
Normalize.VerifyConstants
Walk the AST tree and verify that constant names are used consistently.
|
private class |
ObjectLitAssignmentShortening.ObjectLitShorteningCallback |
private class |
ObjectPropertyStringPostprocess.Callback |
private class |
ObjectPropertyStringPreprocess.Callback |
(package private) class |
OptimizeArgumentsArray
Optimization for functions that have
var_args or access the
arguments array. |
private class |
PeepholeOptimizationsPass.PeepCallback |
(package private) class |
PolymerPass
Rewrites "Polymer({})" calls into a form that is suitable for type checking and dead code
elimination.
|
(package private) class |
PolymerPassFindExterns
Finds the externs for the PolymerElement base class and all of its properties in the externs.
|
(package private) class |
PolymerPassSuppressBehaviors
For every Polymer Behavior, strip property type annotations and add suppress checktypes on
functions.
|
(package private) static class |
PrepareAst.PrepareAnnotations
Normalize where annotations appear on the AST.
|
(package private) class |
ProcessClosurePrimitives
Replaces goog.provide calls, removes goog.require calls, verifies that
goog.require has a corresponding goog.provide and some closure specific
simplifications.
|
(package private) static class |
ProcessCommonJSModules.FindDefineAmdStatements
This class detects the UMD pattern by checking if a node includes
a "define.amd" statement.
|
(package private) static class |
ProcessCommonJSModules.FindGoogProvideOrGoogModule
Avoid processing if we find the appearance of goog.provide or goog.module.
|
(package private) static class |
ProcessCommonJSModules.FindModuleExportStatements
This class detects the UMD pattern by checking if a node includes
a "module.exports" or "exports" statement.
|
private class |
ProcessCommonJSModules.ProcessCommonJsModulesCallback
Visits require, every "script" and special module.exports assignments.
|
private class |
ProcessCommonJSModules.SuffixVarsCallback
Traverses a node tree and appends a suffix to all global variable names.
|
private static class |
ProcessDefines.CollectDefines
Finds all assignments to @defines, and figures out the last value of
the @define.
|
class |
ProcessEs6Modules
Rewrites a ES6 module into a form that can be safely concatenated.
|
private class |
ProcessEs6Modules.RenameGlobalVars
Traverses a node tree and
Appends a suffix to all global variable names defined in this module.
|
private class |
ProcessTweaks.CollectTweaks
Processes all calls to goog.tweak functions.
|
private class |
PureFunctionIdentifier.FunctionAnalyzer
Gather list of functions, functions with @nosideeffects
annotations, call sites, and functions that may mutate variables
not defined in the local scope.
|
(package private) class |
RecordFunctionInformation
Records information about functions and modules.
|
(package private) class |
ReferenceCollectingCallback
A helper class for passes that want to access all information about where a
variable is referenced and declared at once and then make a decision as to
how it should be handled, possibly inlining, reordering, or generating
warnings.
|
(package private) class |
RemoveUnusedClassProperties
This pass looks for properties that are never read and removes them.
|
(package private) class |
RenameLabels.ProcessLabels
Iterate through the nodes, renaming all the labels.
|
private class |
RenameProperties.ProcessProperties
A traversal callback that collects property names and counts how
frequently each property name occurs.
|
(package private) class |
RenameVars.ProcessVars
Iterate through the nodes, collect all the NAME nodes that need to be
renamed, and count how many times each variable name is referenced.
|
private class |
ReplaceCssNames.Traversal |
private class |
ReplaceIdGenerators.GatherGenerators |
private class |
ReplaceIdGenerators.ReplaceGenerators |
(package private) class |
ReplaceMessagesForChrome
Replaces user-visible messages with appropriate calls to
chrome.i18n.getMessage.
|
(package private) class |
ReplaceStrings
Replaces JavaScript strings in the list of supplied methods with shortened
forms.
|
private class |
RescopeGlobalSymbols.FindCrossModuleNamesCallback
Find all global names that are used in more than one module.
|
private class |
RescopeGlobalSymbols.FindNamesReferencingThis
Builds the maybeReferencesThis set of names that may reference a function
that references this.
|
private class |
RescopeGlobalSymbols.MakeExternsReferenceWindowExplicitly
Rewrites extern names to be explicit children of window instead of only
implicitly referencing it.
|
private class |
RescopeGlobalSymbols.RemoveGlobalVarCallback
Removes every occurrence of var that declares a global variable.
|
private class |
RescopeGlobalSymbols.RewriteGlobalFunctionStatementsToVarAssignmentsCallback
Rewrites function statements to var statements + assignment.
|
private class |
RescopeGlobalSymbols.RewriteScopeCallback
Visits each NAME token and checks whether it refers to a global variable.
|
(package private) class |
RewriteBindThis
Rewrite .bind(this) calls on an anonymous functions to arrow functions
(which have implicit this binding).
|
private class |
RewritePolyfills.Traverser |
private class |
RuntimeTypeCheck.AddChecks
Insert calls to the run-time type checking function
checkType , which
takes an expression to check and a list of checkers (one of which must
match). |
private static class |
RuntimeTypeCheck.AddMarkers
Inserts marker properties for user-defined interfaces and classes.
|
private class |
ScopedAliases.Traversal |
private class |
ShadowVariables.DoShadowVariables |
private class |
ShadowVariables.GatherReferenceInfo |
private class |
SimpleDefinitionFinder.DefinitionGatheringCallback |
private class |
SimpleDefinitionFinder.UseSiteGatheringCallback |
(package private) class |
SourceInformationAnnotator
Annotates nodes with information from their original input file
before the compiler performs work that changes this information (such
as its original location, its original name, etc).
|
(package private) class |
StrictModeCheck
Checks that the code obeys the static restrictions of strict mode:
No use of "with".
|
private static class |
StrictModeCheck.NonExternChecks
Checks that are performed on non-extern code only.
|
private class |
StripCode.Strip
A callback that strips debug code from a JavaScript parse tree.
|
(package private) class |
SubstituteEs6Syntax
An optimization that does peephole optimizations of ES6 code.
|
private class |
SymbolTable.JSDocInfoCollector
Collects references to types in JSDocInfo.
|
private class |
SymbolTable.PropertyRefCollector |
private class |
SymbolTable.ThisRefCollector |
private class |
SymbolTable.VisibilityCollector
Collects the visibility information for each name/property.
|
private static class |
TransformAMDToCJSModule.DefineCallbackReturnCallback
Rewrites the return statement of the callback to be an assignment to
module.exports.
|
private static class |
TransformAMDToCJSModule.RenameCallback
Renames names;
|
private class |
TransformAMDToCJSModule.TransformAMDModulesCallback
Rewrites calls to define which has to be in void context just below the
current script node.
|
class |
TypeCheck
Checks the types of JS expressions against any declared type
information.
|
private class |
TypedScopeCreator.AbstractScopeBuilder |
private static class |
TypedScopeCreator.DiscoverEnumsAndTypedefs |
private static class |
TypedScopeCreator.FirstOrderFunctionAnalyzer
Does a first-order function analysis that just looks at simple things
like what variables are escaped, and whether 'this' is used.
|
private class |
TypedScopeCreator.GlobalScopeBuilder
A shallow traversal of the global scope to build up all classes,
functions, and methods.
|
private class |
TypedScopeCreator.LocalScopeBuilder
A shallow traversal of a local scope to find all arguments and
local variables.
|
private static class |
TypeInferencePass.FirstScopeBuildingCallback |
private class |
TypeInferencePass.SecondScopeBuildingCallback |
private class |
UnreachableCodeElimination.EliminationPass |
(package private) class |
VarCheck
Checks that all variables are declared, that file-private variables are
accessed only in the file that declares them, and that any var references
that cross module boundaries respect declared module dependencies.
|
private class |
VarCheck.NameRefInExternsCheck
A check for name references in the externs inputs.
|
private class |
VariableReferenceCheck.ReferenceCheckingBehavior.ShallowReferenceCollector
Do a shallow check since cases like:
function f(y = () => x, x = 5) { return y(); }
is legal.
|
Modifier and Type | Field and Description |
---|---|
private NodeTraversal.Callback |
CombinedCompilerPass.CallbackWrapper.callback
The callback being wrapped.
|
private NodeTraversal.Callback |
NodeTraversal.callback |
Modifier and Type | Method and Description |
---|---|
(package private) NodeTraversal.Callback |
InlineSimpleMethods.getActingCallback() |
(package private) abstract NodeTraversal.Callback |
MethodCompilerPass.getActingCallback()
Subclasses should return a callback that does the actual work they
want to perform given the computed list of method signatures
|
Modifier and Type | Method and Description |
---|---|
static void |
NodeTraversal.traverse(AbstractCompiler compiler,
Node root,
NodeTraversal.Callback cb)
Deprecated.
Use traverseEs6 whenever possible.
|
static void |
NodeTraversal.traverseEs6(AbstractCompiler compiler,
Node root,
NodeTraversal.Callback cb)
Traverses using the ES6SyntacticScopeCreator
|
static void |
NodeTraversal.traverseRoots(AbstractCompiler compiler,
NodeTraversal.Callback cb,
Node externs,
Node root)
Deprecated.
|
static void |
NodeTraversal.traverseRootsEs6(AbstractCompiler compiler,
NodeTraversal.Callback cb,
Node externs,
Node root) |
static void |
NodeTraversal.traverseRootsTyped(AbstractCompiler compiler,
NodeTraversal.Callback cb,
Node externs,
Node root) |
static void |
NodeTraversal.traverseTyped(AbstractCompiler compiler,
Node root,
NodeTraversal.Callback cb) |
Modifier and Type | Method and Description |
---|---|
private static HotSwapCompilerPass |
DefaultPassConfig.combineChecks(AbstractCompiler compiler,
java.util.List<NodeTraversal.Callback> callbacks)
Executes the given callbacks with a
CombinedCompilerPass . |
(package private) static void |
CombinedCompilerPass.traverse(AbstractCompiler compiler,
Node root,
java.util.List<NodeTraversal.Callback> callbacks) |
Constructor and Description |
---|
CallbackWrapper(NodeTraversal.Callback callback) |
CombinedCompilerPass(AbstractCompiler compiler,
NodeTraversal.Callback... callbacks)
Creates a combined compiler pass.
|
NodeTraversal(AbstractCompiler compiler,
NodeTraversal.Callback cb)
Creates a node traversal using the specified callback interface.
|
NodeTraversal(AbstractCompiler compiler,
NodeTraversal.Callback cb,
ScopeCreator scopeCreator)
Creates a node traversal using the specified callback interface
and the scope creator.
|
Constructor and Description |
---|
CombinedCompilerPass(AbstractCompiler compiler,
java.util.List<NodeTraversal.Callback> callbacks) |
Modifier and Type | Class and Description |
---|---|
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 |
CheckForInOverArray
Checks when the pattern for (x in arr) { ...
|
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. |
private static class |
CheckJSDocStyle.ExternsCallback |
private static class |
CheckJSDocStyle.FindNonTrivialReturn |
class |
CheckNullableReturn
Checks when a function is annotated as returning {SomeType} (nullable)
but actually always returns {!SomeType}, i.e.
|
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 |
CheckUselessBlocks
Check for useless blocks.
|
Modifier and Type | Class and Description |
---|---|
private static class |
ErrorToFixMapper.RequireProvideSorter |
(package private) class |
JsFlumeCallback
A compiler node traversal callback that invokes matchers against every node and
keeps track of any suggested fixes from the refactoring.
|