public final class Es6SyntacticScopeCreator extends 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.
Constructor and Description |
---|
Es6SyntacticScopeCreator(AbstractCompiler compiler) |
Modifier and Type | Method and Description |
---|---|
Scope |
createScope(Node n,
Scope parent)
Creates a
Scope object. |
boolean |
hasBlockScope() |
public Es6SyntacticScopeCreator(AbstractCompiler compiler)
public Scope createScope(Node n, Scope 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-2017 Google. All Rights Reserved.