/** enter_scope enter a new nested scope. Increment the nesting * level. push new scope's symbol table onto the * stack. * */ void cx_symtab_stack::enter_scope(void) { if (++current_nesting_level > max_nesting_level) { cx_error(err_nesting_too_deep); abort_translation(abort_nesting_too_deep); } set_current_symtab(new cx_symtab); }
/** enter_scope enter a new nested scope. Increment the nesting * level. push new scope's symbol table onto the * stack. * */ void cx_symtab_stack::enter_scope(void) { // dont overwrite mains scope //if (current_nesting_level <= 1)++current_nesting_level; if (++current_nesting_level > max_nesting_level) { cx_error(err_nesting_too_deep); abort_translation(abort_nesting_too_deep); } set_current_symtab(new cx_symtab); }