Package com.google.javascript.jscomp
Class SyntacticScopeCreator
java.lang.Object
com.google.javascript.jscomp.SyntacticScopeCreator
The syntactic scope creator scans the parse tree to create a Scope object containing all the
variable declarations in that scope. This class adds support for block-level scopes introduced in
ECMAScript 6.
This implementation is not thread-safe.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.google.javascript.jscomp.ScopeCreator
A scope creator that can be provided to NodeTraversal to ensure that no scopes are actually ever created.static final com.google.javascript.jscomp.SyntacticScopeCreator.RedeclarationHandler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateScope
(Node n, AbstractScope<?, ?> parent) createScope
(Node n, Scope parent)
-
Field Details
-
DEFAULT_REDECLARATION_HANDLER
public static final com.google.javascript.jscomp.SyntacticScopeCreator.RedeclarationHandler DEFAULT_REDECLARATION_HANDLER -
ASSERT_NO_SCOPES_CREATED
static final com.google.javascript.jscomp.ScopeCreator ASSERT_NO_SCOPES_CREATEDA scope creator that can be provided to NodeTraversal to ensure that no scopes are actually ever created. This is in contrast to the default SyntacticScopeCreator, which will create scopes on demand.
-
-
Constructor Details
-
SyntacticScopeCreator
-
-
Method Details
-
createScope
-
createScope
-