public class Symbol
extends java.lang.Object
Constructor and Description |
---|
Symbol() |
Symbol(int declType,
java.lang.String name)
Constructs a new Symbol with a specific name and declaration type
|
Modifier and Type | Method and Description |
---|---|
Scope |
getContainingTable()
Returns the Scope in which this symbol is entered
|
int |
getDeclType()
Returns symbol declaration type
|
java.lang.String |
getDeclTypeName() |
int |
getIndex()
Returns symbol's index in its scope
|
java.lang.String |
getName()
Returns symbol name
|
Node |
getNode()
Returns the node associated with this identifier
|
void |
setContainingTable(Scope containingTable)
Sets this symbol's Scope
|
void |
setDeclType(int declType)
Sets symbol declaration type
|
void |
setIndex(int index)
Sets symbol's index in its scope
|
void |
setName(java.lang.String name)
Sets symbol name
|
void |
setNode(Node node)
Sets the node associated with this identifier
|
java.lang.String |
toString() |
public Symbol()
public Symbol(int declType, java.lang.String name)
declType
- Token.FUNCTION
, Token.LP
(for params), Token.VAR
, Token.LET
or Token.CONST
public int getDeclType()
public void setDeclType(int declType)
public java.lang.String getName()
public void setName(java.lang.String name)
public Node getNode()
public int getIndex()
public void setIndex(int index)
public void setNode(Node node)
public Scope getContainingTable()
public void setContainingTable(Scope containingTable)
public java.lang.String getDeclTypeName()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2010 - 2020 Adobe. All Rights Reserved