public static final class SymbolTable.SymbolScope extends Object implements StaticScope<JSType>
| Modifier and Type | Method and Description |
|---|---|
int |
getIndexOfSymbol(SymbolTable.Symbol sym)
Gets a unique index for the symbol in this scope.
|
SymbolTable.Symbol |
getOwnSlot(String name)
Like
getSlot but does not recurse into parent scopes. |
SymbolTable.SymbolScope |
getParentScope()
Returns the scope enclosing this one or null if none.
|
SymbolTable.Symbol |
getQualifiedSlot(String name)
Get the slot for a fully-qualified name (e.g., "a.b.c") by trying
to find property scopes at each part of the path.
|
Node |
getRootNode()
Returns the root node associated with this scope.
|
int |
getScopeDepth() |
SymbolTable.Symbol |
getSlot(String name)
Returns any defined slot within this scope for this name.
|
JSType |
getTypeOfThis()
Returns the expected type of
this in the current scope. |
boolean |
isDocScope()
Returns whether this is a doc scope.
|
boolean |
isGlobalScope() |
boolean |
isLexicalScope() |
boolean |
isPropertyScope() |
String |
toString() |
public int getIndexOfSymbol(SymbolTable.Symbol sym)
public Node getRootNode()
StaticScopegetRootNode in interface StaticScope<JSType>public SymbolTable.SymbolScope getParentScope()
StaticScopegetParentScope in interface StaticScope<JSType>public SymbolTable.Symbol getQualifiedSlot(String name)
public SymbolTable.Symbol getSlot(String name)
StaticScopegetSlot in interface StaticScope<JSType>name - The name of the variable slot to look up.null if no
definition exists.public SymbolTable.Symbol getOwnSlot(String name)
StaticScopegetSlot but does not recurse into parent scopes.getOwnSlot in interface StaticScope<JSType>public JSType getTypeOfThis()
StaticScopethis in the current scope.getTypeOfThis in interface StaticScope<JSType>public boolean isGlobalScope()
public boolean isDocScope()
public boolean isPropertyScope()
public boolean isLexicalScope()
public int getScopeDepth()