public final class TypeTable extends SymbolTable
| Constructor and Description |
|---|
TypeTable() |
| Modifier and Type | Method and Description |
|---|---|
TypeTable |
cloneTypeTable()
creates a clone of the symbol table, the clone is a shallow copy
(the symbols in the table are not cloned)
|
TypeSymbol |
getSymbol(Identifier name)
returns symbol associated to name (null, if none)
|
Type |
getType(Identifier key)
returns canonical type associated to key
type equality implies pointer equality of types.
|
TypeSymbol |
put(TypeDeclIdentifier key,
Type type)
put type in type table
|
cloneTable, getSymbolspublic TypeTable cloneTypeTable()
public TypeSymbol put(TypeDeclIdentifier key, Type type)
key - the name of the typetype - the type associated to the namepublic TypeSymbol getSymbol(Identifier name)
name - the namepublic Type getType(Identifier key)
key - the name of the type