mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
remove nested scopes for traditional mode
This commit is contained in:
parent
91207c0180
commit
4ce81b28d7
1 changed files with 15 additions and 11 deletions
|
@ -566,22 +566,26 @@ end_function
|
||||||
statement_block
|
statement_block
|
||||||
: '{'
|
: '{'
|
||||||
{
|
{
|
||||||
scope_t *scope = new_scope (sc_local, current_scope->space,
|
if (!options.traditional) {
|
||||||
current_scope);
|
scope_t *scope = new_scope (sc_local, current_scope->space,
|
||||||
current_scope = scope;
|
current_scope);
|
||||||
|
current_scope = scope;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
statements '}'
|
statements '}'
|
||||||
{
|
{
|
||||||
def_t *defs = current_scope->head;
|
if (!options.traditional) {
|
||||||
int num_defs = current_scope->num_defs;
|
def_t *defs = current_scope->head;
|
||||||
|
int num_defs = current_scope->num_defs;
|
||||||
|
|
||||||
flush_scope (current_scope, 1);
|
flush_scope (current_scope, 1);
|
||||||
|
|
||||||
current_scope = current_scope->parent;
|
current_scope = current_scope->parent;
|
||||||
current_scope->num_defs += num_defs;
|
current_scope->num_defs += num_defs;
|
||||||
*current_scope->tail = defs;
|
*current_scope->tail = defs;
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue