Package com.google.javascript.jscomp
Class SyntacticScopeCreator
- java.lang.Object
-
- com.google.javascript.jscomp.SyntacticScopeCreator
-
public final class SyntacticScopeCreator extends java.lang.Object
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
Fields Modifier and Type Field Description static com.google.javascript.jscomp.ScopeCreator
ASSERT_NO_SCOPES_CREATED
A scope creator that can be provided to NodeTraversal to ensure that no scopes are actually ever created.static com.google.javascript.jscomp.SyntacticScopeCreator.RedeclarationHandler
DEFAULT_REDECLARATION_HANDLER
-
Constructor Summary
Constructors Constructor Description SyntacticScopeCreator(AbstractCompiler compiler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Scope
createScope(Node n, AbstractScope<?,?> parent)
Scope
createScope(Node n, Scope parent)
-
-
-
Field Detail
-
DEFAULT_REDECLARATION_HANDLER
public static final com.google.javascript.jscomp.SyntacticScopeCreator.RedeclarationHandler DEFAULT_REDECLARATION_HANDLER
-
ASSERT_NO_SCOPES_CREATED
public static final com.google.javascript.jscomp.ScopeCreator ASSERT_NO_SCOPES_CREATED
A 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 Detail
-
SyntacticScopeCreator
public SyntacticScopeCreator(AbstractCompiler compiler)
-
-