mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
allow static local vars
This commit is contained in:
parent
3f3ec6404d
commit
e9f49ca816
1 changed files with 7 additions and 1 deletions
|
@ -299,6 +299,11 @@ storage_class
|
|||
| SYSTEM { current_storage = st_system; }
|
||||
;
|
||||
|
||||
local_storage_class
|
||||
: LOCAL { current_storage = st_local; }
|
||||
| STATIC { current_storage = st_static; }
|
||||
;
|
||||
|
||||
struct_defs
|
||||
: /* empty */
|
||||
| struct_defs struct_def ';'
|
||||
|
@ -853,7 +858,7 @@ statement
|
|||
pr.source_line = line;
|
||||
pr.source_file = file;
|
||||
}
|
||||
| LOCAL type
|
||||
| local_storage_class type
|
||||
{
|
||||
$<type>$ = $2;
|
||||
local_expr = new_block_expr ();
|
||||
|
@ -863,6 +868,7 @@ statement
|
|||
$$ = local_expr;
|
||||
local_expr = 0;
|
||||
(void) ($<type>3);
|
||||
current_storage = st_local;
|
||||
}
|
||||
| IF '(' fexpr ')' save_inits statement
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue