public 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 implementation is not thread-safe.
Modifier and Type | Field and 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.
|
Modifier and Type | Method and Description |
---|---|
com.google.javascript.jscomp.AbstractScope<?,?> |
createScope(Node n,
com.google.javascript.jscomp.AbstractScope<?,?> parent)
Creates a
Scope object. |
boolean |
hasBlockScope() |
static SyntacticScopeCreator |
makeUntyped(AbstractCompiler compiler)
Deprecated.
Use Es6SyntacticScopeCreator instead.
|
public static final com.google.javascript.jscomp.ScopeCreator ASSERT_NO_SCOPES_CREATED
@Deprecated public static SyntacticScopeCreator makeUntyped(AbstractCompiler compiler)
public com.google.javascript.jscomp.AbstractScope<?,?> createScope(Node n, com.google.javascript.jscomp.AbstractScope<?,?> parent)
Scope
object.n
- the root node (either a FUNCTION node, a SCRIPT node, or a
synthetic block node whose children are all SCRIPT nodes)parent
- the parent Scope object (may be null)public boolean hasBlockScope()
Copyright © 2009-2018 Google. All Rights Reserved.