|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.javascript.jscomp.SymbolTable.SymbolScope
public static final class SymbolTable.SymbolScope
Method Summary | |
---|---|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public int getIndexOfSymbol(SymbolTable.Symbol sym)
public Node getRootNode()
StaticScope
getRootNode
in interface StaticScope<JSType>
public SymbolTable.SymbolScope getParentScope()
StaticScope
getParentScope
in interface StaticScope<JSType>
public SymbolTable.Symbol getQualifiedSlot(String name)
public SymbolTable.Symbol getSlot(String name)
StaticScope
getSlot
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)
StaticScope
getSlot
but does not recurse into parent scopes.
getOwnSlot
in interface StaticScope<JSType>
public JSType getTypeOfThis()
StaticScope
this
in the current scope.
getTypeOfThis
in interface StaticScope<JSType>
public boolean isGlobalScope()
public boolean isDocScope()
public boolean isPropertyScope()
public boolean isLexicalScope()
public int getScopeDepth()
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |