Package org.mozilla.javascript.ast
Class Symbol
java.lang.Object
org.mozilla.javascript.ast.Symbol
Represents a symbol-table entry.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the Scope in which this symbol is enteredintReturns symbol declaration typeintgetIndex()Returns symbol's index in its scopegetName()Returns symbol namegetNode()Returns the node associated with this identifiervoidsetContainingTable(Scope containingTable) Sets this symbol's ScopevoidsetDeclType(int declType) Sets symbol declaration typevoidsetIndex(int index) Sets symbol's index in its scopevoidSets symbol namevoidSets the node associated with this identifiertoString()
-
Constructor Details
-
Symbol
public Symbol() -
Symbol
Constructs a new Symbol with a specific name and declaration type- Parameters:
declType-Token.FUNCTION,Token.LP(for params),Token.VAR,Token.LETorToken.CONST
-
-
Method Details
-
getDeclType
public int getDeclType()Returns symbol declaration type -
setDeclType
public void setDeclType(int declType) Sets symbol declaration type -
getName
Returns symbol name -
setName
Sets symbol name -
getNode
Returns the node associated with this identifier -
getIndex
public int getIndex()Returns symbol's index in its scope -
setIndex
public void setIndex(int index) Sets symbol's index in its scope -
setNode
Sets the node associated with this identifier -
getContainingTable
Returns the Scope in which this symbol is entered -
setContainingTable
Sets this symbol's Scope -
getDeclTypeName
-
toString
-