mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 12:52:46 +00:00
group the struct rules together
This commit is contained in:
parent
43b6aed397
commit
48f8bbd12e
1 changed files with 13 additions and 13 deletions
|
@ -318,6 +318,19 @@ struct_def
|
|||
: type { $$ = $1; } struct_def_list { $$ = $<type>2; }
|
||||
;
|
||||
|
||||
struct_def_list
|
||||
: struct_def_list ',' { $$ = $<type>0; } struct_def_item
|
||||
{ (void) ($<type>3); }
|
||||
| struct_def_item
|
||||
;
|
||||
|
||||
struct_def_item
|
||||
: identifier
|
||||
{
|
||||
new_struct_field (current_struct, $<type>0, $1, vis_public);
|
||||
}
|
||||
;
|
||||
|
||||
enum_list
|
||||
: enum
|
||||
| enum_list ',' enum
|
||||
|
@ -437,19 +450,6 @@ array_decl
|
|||
| '[' ']' { $$ = 0; }
|
||||
;
|
||||
|
||||
struct_def_list
|
||||
: struct_def_list ',' { $$ = $<type>0; } struct_def_item
|
||||
{ (void) ($<type>3); }
|
||||
| struct_def_item
|
||||
;
|
||||
|
||||
struct_def_item
|
||||
: identifier
|
||||
{
|
||||
new_struct_field (current_struct, $<type>0, $1, vis_public);
|
||||
}
|
||||
;
|
||||
|
||||
def_list
|
||||
: def_list ',' { $$ = $<type>0; } def_item { (void) ($<type>3); }
|
||||
| def_item
|
||||
|
|
Loading…
Reference in a new issue