public final class ValueTable extends SymbolTable
Constructor and Description |
---|
ValueTable() |
Modifier and Type | Method and Description |
---|---|
ValueTable |
cloneValueTable()
creates a clone of the symbol table, the clone is a shallow copy
(the symbols in the table are not cloned)
|
ValueSymbol |
getSymbol(Identifier name)
returns symbol associated to name (null, if none)
|
ValueSymbol |
put(ValueDeclIdentifier name,
Type type,
Expression value,
int depth)
put named value in value table
|
cloneTable, getSymbols
public ValueTable cloneValueTable()
public ValueSymbol put(ValueDeclIdentifier name, Type type, Expression value, int depth)
name
- the name of the valuetype
- the type associated to the valuevalue
- the value itself (may be null)depth
- the current environment depthpublic ValueSymbol getSymbol(Identifier name)
name
- the name