Package org.mozilla.javascript.ast
Class Symbol
java.lang.Object
org.mozilla.javascript.ast.Symbol
Represents a symbol-table entry.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the Scope in which this symbol is enteredint
Returns symbol declaration typeint
getIndex()
Returns symbol's index in its scopegetName()
Returns symbol namegetNode()
Returns the node associated with this identifiervoid
setContainingTable
(Scope containingTable) Sets this symbol's Scopevoid
setDeclType
(int declType) Sets symbol declaration typevoid
setIndex
(int index) Sets symbol's index in its scopevoid
Sets symbol namevoid
Sets 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.LET
orToken.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
-