engine/source/scriptlib/StackedSymbolTable.c
/******************************************************************************
*  PushScope -- This method creates a new symbol table and pushes it onto the
*  symbol table stack.  The top symbol table on the stack represents the
*  innermost symbol scope.
******************************************************************************/
- This method creates a new symbol table and pushes it onto the
symbol table stack.  The top symbol table on the stack represents the
innermost symbol scope.
- This method creates a new symbol table and pushes it onto the symbol table stack . The top symbol table on the stack represents the innermost symbol scope .
void StackedSymbolTable_PushScope(StackedSymbolTable *sstable, LPCSTR scopeName )
{
    SymbolTable *newSymbolTable = NULL;
    newSymbolTable = (SymbolTable *)malloc(sizeof(SymbolTable));
    if (scopeName)
    {
        SymbolTable_Init(newSymbolTable, scopeName);
    }
    else
    {
        SymbolTable_Init(newSymbolTable, "");
    }
    Stack_Push(&(sstable->SymbolTableStack), (void *)newSymbolTable );
}
void StackedSymbolTable_PushScope ( StackedSymbolTable * sstable , LPCSTR scopeName ) { SymbolTable * newSymbolTable = NULL ; newSymbolTable = ( SymbolTable * ) malloc ( sizeof ( SymbolTable ) ) ; if ( scopeName ) { SymbolTable_Init ( newSymbolTable , scopeName ) ; } else { SymbolTable_Init ( newSymbolTable , " " ) ; } Stack_Push ( & ( sstable -> SymbolTableStack ) , ( void * ) newSymbolTable ) ; }
PushScope -- This method creates a new symbol table and pushes it onto the
symbol table stack.
PushScope -- This method creates a new symbol table and pushes it onto the symbol table stack .
//We have to have a name for this scope, so if we got NULL, then use "" //Add the new symboltable to the stack