remove nested scopes for traditional mode

This commit is contained in:
Bill Currie 2003-09-23 17:59:46 +00:00
parent 91207c0180
commit 4ce81b28d7

View file

@ -566,12 +566,15 @@ end_function
statement_block statement_block
: '{' : '{'
{ {
if (!options.traditional) {
scope_t *scope = new_scope (sc_local, current_scope->space, scope_t *scope = new_scope (sc_local, current_scope->space,
current_scope); current_scope);
current_scope = scope; current_scope = scope;
} }
}
statements '}' statements '}'
{ {
if (!options.traditional) {
def_t *defs = current_scope->head; def_t *defs = current_scope->head;
int num_defs = current_scope->num_defs; int num_defs = current_scope->num_defs;
@ -583,6 +586,7 @@ statement_block
while (*current_scope->tail) { while (*current_scope->tail) {
current_scope->tail = &(*current_scope->tail)->def_next; current_scope->tail = &(*current_scope->tail)->def_next;
} }
}
$$ = $3; $$ = $3;
} }
; ;