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

Implementation of a table of constants. More...

Public Member Functions

 ConstantTable ()
 Constructor of ConstantTable. More...
 
void Set ()
 Add a new scope More...
 
void Reset ()
 Removes the last scope More...
 
bool Insert (string id, Expression init)
 Insert a new constant in the current scope. More...
 
Expression Search (string id, out int scope)
 Searches the initialization of constant identifier. More...
 
Expression Search (string id)
 Searches the initialization of constant identifier. It performs a full search. More...
 
 ConstantTable ()
 Constructor of ConstantTable. More...
 
void Set ()
 Add a new scope More...
 
void Reset ()
 Removes the last scope More...
 
bool Insert (string id, Expression init)
 Insert a new constant in the current scope. More...
 
Expression Search (string id, out int scope)
 Searches the initialization of constant identifier. More...
 
Expression Search (string id)
 Searches the initialization of constant identifier. It performs a full search. More...
 

Detailed Description

Implementation of a table of constants.

Definition at line 27 of file ConstantTable.cs.

Constructor & Destructor Documentation

CodeGeneration.ConstantTable.ConstantTable ( )

Constructor of ConstantTable.

Definition at line 42 of file ConstantTable.cs.

CodeGeneration.ConstantTable.ConstantTable ( )

Constructor of ConstantTable.

Definition at line 42 of file ConstantTable.cs.

Member Function Documentation

bool CodeGeneration.ConstantTable.Insert ( string  id,
Expression  init 
)

Insert a new constant in the current scope.

Parameters
idConstant identifier.
initConstant initialization.
Returns
True if the element is inserted, false otherwise.

Definition at line 78 of file ConstantTable.cs.

bool CodeGeneration.ConstantTable.Insert ( string  id,
Expression  init 
)

Insert a new constant in the current scope.

Parameters
idConstant identifier.
initConstant initialization.
Returns
True if the element is inserted, false otherwise.

Definition at line 78 of file ConstantTable.cs.

void CodeGeneration.ConstantTable.Reset ( )

Removes the last scope

Definition at line 64 of file ConstantTable.cs.

void CodeGeneration.ConstantTable.Reset ( )

Removes the last scope

Definition at line 64 of file ConstantTable.cs.

Expression CodeGeneration.ConstantTable.Search ( string  id,
out int  scope 
)

Searches the initialization of constant identifier.

Parameters
idIdentifier name.
scopezero-based scope where the constant is found. -1 if the search does not success
Returns
Returns the initialization expression associated with the constant or null if the constant is not found.

// devolver un scope

Definition at line 96 of file ConstantTable.cs.

Expression CodeGeneration.ConstantTable.Search ( string  id,
out int  scope 
)

Searches the initialization of constant identifier.

Parameters
idIdentifier name.
scopezero-based scope where the constant is found. -1 if the search does not success
Returns
Returns the initialization expression associated with the constant or null if the constant is not found.

// devolver un scope

Definition at line 96 of file ConstantTable.cs.

Expression CodeGeneration.ConstantTable.Search ( string  id)

Searches the initialization of constant identifier. It performs a full search.

Parameters
idIdentifier name.
Returns
Returns the initialization expression associated to the specified name.

// devolver un scope

Definition at line 113 of file ConstantTable.cs.

Expression CodeGeneration.ConstantTable.Search ( string  id)

Searches the initialization of constant identifier. It performs a full search.

Parameters
idIdentifier name.
Returns
Returns the initialization expression associated to the specified name.

// devolver un scope

Definition at line 113 of file ConstantTable.cs.

void CodeGeneration.ConstantTable.Set ( )

Add a new scope

Definition at line 53 of file ConstantTable.cs.

void CodeGeneration.ConstantTable.Set ( )

Add a new scope

Definition at line 53 of file ConstantTable.cs.


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