mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-04-19 07:51:08 +00:00
[qfcc] Support multiple type specs in type_ref
This is needed for `unsigned int` or `unsigned long` in type expressions. However, there is a problem where @vector etc complain about just `unsigned` (which should default to int, of course).
This commit is contained in:
parent
65fc6054bb
commit
64334759f4
1 changed files with 7 additions and 1 deletions
|
@ -181,6 +181,7 @@ int yylex (YYSTYPE *yylval, YYLTYPE *yylloc);
|
|||
%type <symbol> generic_param
|
||||
%type <op> type_func type_op
|
||||
%type <expr> type_function type_param type_ref
|
||||
%type <spec> type_ref_spec
|
||||
%type <expr> generic_type
|
||||
%type <mut_expr> type_list type_param_list
|
||||
|
||||
|
@ -1250,7 +1251,7 @@ type_list
|
|||
;
|
||||
|
||||
type_ref
|
||||
: TYPE_SPEC { $$ = new_type_expr ($1.type); }
|
||||
: type_ref_spec { $$ = new_type_expr ($1.type); }
|
||||
| CLASS_NAME { $$ = new_type_expr ($1->type); }
|
||||
| TYPE_NAME
|
||||
{
|
||||
|
@ -1262,6 +1263,11 @@ type_ref
|
|||
}
|
||||
;
|
||||
|
||||
type_ref_spec
|
||||
: TYPE_SPEC
|
||||
| type_ref_spec TYPE_SPEC { $$ = spec_merge ($1, $2); }
|
||||
;
|
||||
|
||||
attribute_list
|
||||
: attribute
|
||||
| attribute_list ',' attribute
|
||||
|
|
Loading…
Reference in a new issue