mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 15:01:41 +00:00
allow type (parm, parm, ...) to compile (the parms aren't type checked yet)
This commit is contained in:
parent
411ade4ce2
commit
4f7245d634
1 changed files with 11 additions and 3 deletions
|
@ -114,7 +114,7 @@ typedef struct {
|
|||
%token <type> TYPE
|
||||
|
||||
%type <type> type opt_func func_parms array_decl
|
||||
%type <integer_val> opt_field
|
||||
%type <integer_val> opt_field opt_comma_elipsis
|
||||
%type <def> param param_list def_name
|
||||
%type <def> var_def_item var_def_list
|
||||
%type <def> func_def_item func_def_list
|
||||
|
@ -239,7 +239,7 @@ func_parms
|
|||
pr_scope->alloc = &pr_scope->locals;
|
||||
*pr_scope->alloc = 0;
|
||||
}
|
||||
param_list
|
||||
param_list opt_comma_elipsis
|
||||
{
|
||||
PR_FlushScope (pr_scope, 1);
|
||||
current_type = $<scope>2.type;
|
||||
|
@ -247,6 +247,9 @@ func_parms
|
|||
}
|
||||
')'
|
||||
{
|
||||
if ($4)
|
||||
$$ = parse_params ((def_t*)1);
|
||||
else
|
||||
$$ = parse_params ($3);
|
||||
}
|
||||
| '(' ')'
|
||||
|
@ -325,6 +328,11 @@ def_name
|
|||
}
|
||||
;
|
||||
|
||||
opt_comma_elipsis
|
||||
: /* empty */ { $$ = 0 }
|
||||
| ',' ELIPSIS { $$ = 1 }
|
||||
;
|
||||
|
||||
param_list
|
||||
: param
|
||||
| param_list ',' param
|
||||
|
|
Loading…
Reference in a new issue