The StaDyn Programming Language
Source code documentation of StaDyn, a hybrid static and dynamic typing language.
|
Implementation of a symbol table. More...
Public Member Functions | |
SymbolTable () | |
Constructor of SymbolTable. More... | |
void | Set () |
Add a new scope More... | |
void | Reset () |
Removes the last scope More... | |
Symbol | Insert (string id, TypeExpression type, bool isDynamic) |
Insert a new symbol in the current scope. More... | |
Symbol | Search (string id) |
Searches in the symbol table for a symbol matching the specified name. More... | |
Implementation of a symbol table.
Definition at line 26 of file SymbolTable.cs.
Symbols.SymbolTable.SymbolTable | ( | ) |
Constructor of SymbolTable.
Definition at line 42 of file SymbolTable.cs.
Symbol Symbols.SymbolTable.Insert | ( | string | id, |
TypeExpression | type, | ||
bool | isDynamic | ||
) |
Insert a new symbol in the current scope.
id | Symbol identifier. |
type | Symbol type. |
isDynamic | True if the symbol is dynamic, false otherwise. |
Definition at line 84 of file SymbolTable.cs.
void Symbols.SymbolTable.Reset | ( | ) |
Removes the last scope
Definition at line 67 of file SymbolTable.cs.
Symbol Symbols.SymbolTable.Search | ( | string | id | ) |
Searches in the symbol table for a symbol matching the specified name.
id | Identifier name. |
Definition at line 103 of file SymbolTable.cs.
void Symbols.SymbolTable.Set | ( | ) |
Add a new scope
Definition at line 54 of file SymbolTable.cs.