The StaDyn Programming Language
Source code documentation of StaDyn, a hybrid static and dynamic typing language.
Symbols.SymbolTable Class Reference

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...
 

Detailed Description

Implementation of a symbol table.

Definition at line 26 of file SymbolTable.cs.

Constructor & Destructor Documentation

Symbols.SymbolTable.SymbolTable ( )

Constructor of SymbolTable.

Definition at line 42 of file SymbolTable.cs.

Member Function Documentation

Symbol Symbols.SymbolTable.Insert ( string  id,
TypeExpression  type,
bool  isDynamic 
)

Insert a new symbol in the current scope.

Parameters
idSymbol identifier.
typeSymbol type.
isDynamicTrue if the symbol is dynamic, false otherwise.
Returns
The symbol inserted, null 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.

Parameters
idIdentifier name.
Returns
Returns the symbol matching specified 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.


The documentation for this class was generated from the following file: