public final class ValueSymbol extends SymbolBase
| Constructor and Description |
|---|
ValueSymbol(ValueDeclIdentifier ident)
Construct value symbol from ident (type and value are both null).
|
| Modifier and Type | Method and Description |
|---|---|
TypeExpression |
getClearType()
Get clear type.
|
int |
getDepth()
Return environment depth of symbol.
|
Type |
getType()
Return type of symbol.
|
Expression |
getValue()
Return value of symbol
|
ValueDeclIdentifier |
getValueDeclIdentifier()
Return identifier of symbol.
|
int |
getVarNumber()
Return variable number of symbol.
|
void |
instantiate(ValueSymbol symbol)
Instantiate symbol with copy of denoted symbol.
|
void |
setClearType(TypeExpression clearType)
Set clear type to typexp.
|
void |
setDepth(int depth)
Set environment depth of symbol.
|
void |
setType(Type type)
Set type of symbol.
|
void |
setValue(Expression value)
Set value of symbol.
|
void |
setVarNumber(int varNumber)
Set variable number of symbol.
|
getIdentifierpublic ValueSymbol(ValueDeclIdentifier ident)
ident - the identifier of the symbol.public ValueDeclIdentifier getValueDeclIdentifier()
public Type getType()
public Expression getValue()
public int getDepth()
public int getVarNumber()
public void setType(Type type)
type - the symbol typepublic void setValue(Expression value)
value - the symbol valuepublic void setDepth(int depth)
depth - the symbol environment depthpublic void setVarNumber(int varNumber)
varNumber - variable number of symbolpublic void setClearType(TypeExpression clearType)
clearType - the type/expression pair representing the cleared typepublic TypeExpression getClearType()
public void instantiate(ValueSymbol symbol)
symbol - the symbol from which the instantiation is derived