mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 23:11:38 +00:00
Use abstract_decl instead of type wherever a generic type is needed.
This commit is contained in:
parent
a208aed6ef
commit
564b7b9968
1 changed files with 15 additions and 12 deletions
|
@ -1004,9 +1004,9 @@ unary_expr
|
||||||
| '&' cast_expr %prec UNARY { $$ = address_expr ($2, 0, 0); }
|
| '&' cast_expr %prec UNARY { $$ = address_expr ($2, 0, 0); }
|
||||||
| '*' cast_expr %prec UNARY { $$ = pointer_expr ($2); }
|
| '*' cast_expr %prec UNARY { $$ = pointer_expr ($2); }
|
||||||
| SIZEOF unary_expr %prec UNARY { $$ = sizeof_expr ($2, 0); }
|
| SIZEOF unary_expr %prec UNARY { $$ = sizeof_expr ($2, 0); }
|
||||||
| SIZEOF '(' type ')' %prec HYPERUNARY
|
| SIZEOF '(' abstract_decl ')' %prec HYPERUNARY
|
||||||
{
|
{
|
||||||
$$ = sizeof_expr (0, $3.type);
|
$$ = sizeof_expr (0, $3->type);
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -1028,7 +1028,10 @@ primary
|
||||||
|
|
||||||
cast_expr
|
cast_expr
|
||||||
: unary_expr
|
: unary_expr
|
||||||
| '(' type ')' cast_expr %prec UNARY { $$ = cast_expr ($2.type, $4); }
|
| '(' abstract_decl ')' cast_expr %prec UNARY
|
||||||
|
{
|
||||||
|
$$ = cast_expr ($2->type, $4);
|
||||||
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
expr
|
expr
|
||||||
|
@ -1436,12 +1439,12 @@ methodproto
|
||||||
;
|
;
|
||||||
|
|
||||||
methoddecl
|
methoddecl
|
||||||
: '(' type ')' unaryselector
|
: '(' abstract_decl ')' unaryselector
|
||||||
{ $$ = new_method ($2.type, $4, 0); }
|
{ $$ = new_method ($2->type, $4, 0); }
|
||||||
| unaryselector
|
| unaryselector
|
||||||
{ $$ = new_method (&type_id, $1, 0); }
|
{ $$ = new_method (&type_id, $1, 0); }
|
||||||
| '(' type ')' keywordselector optional_param_list
|
| '(' abstract_decl ')' keywordselector optional_param_list
|
||||||
{ $$ = new_method ($2.type, $4, $5); }
|
{ $$ = new_method ($2->type, $4, $5); }
|
||||||
| keywordselector optional_param_list
|
| keywordselector optional_param_list
|
||||||
{ $$ = new_method (&type_id, $1, $2); }
|
{ $$ = new_method (&type_id, $1, $2); }
|
||||||
;
|
;
|
||||||
|
@ -1494,12 +1497,12 @@ reserved_word
|
||||||
;
|
;
|
||||||
|
|
||||||
keyworddecl
|
keyworddecl
|
||||||
: selector ':' '(' type ')' identifier
|
: selector ':' '(' abstract_decl ')' identifier
|
||||||
{ $$ = new_param ($1->name, $4.type, $6->name); }
|
{ $$ = new_param ($1->name, $4->type, $6->name); }
|
||||||
| selector ':' identifier
|
| selector ':' identifier
|
||||||
{ $$ = new_param ($1->name, &type_id, $3->name); }
|
{ $$ = new_param ($1->name, &type_id, $3->name); }
|
||||||
| ':' '(' type ')' identifier
|
| ':' '(' abstract_decl ')' identifier
|
||||||
{ $$ = new_param ("", $3.type, $5->name); }
|
{ $$ = new_param ("", $3->type, $5->name); }
|
||||||
| ':' identifier
|
| ':' identifier
|
||||||
{ $$ = new_param ("", &type_id, $2->name); }
|
{ $$ = new_param ("", &type_id, $2->name); }
|
||||||
;
|
;
|
||||||
|
@ -1508,7 +1511,7 @@ obj_expr
|
||||||
: obj_messageexpr
|
: obj_messageexpr
|
||||||
| SELECTOR '(' selectorarg ')' { $$ = selector_expr ($3); }
|
| SELECTOR '(' selectorarg ')' { $$ = selector_expr ($3); }
|
||||||
| PROTOCOL '(' identifier ')' { $$ = protocol_expr ($3->name); }
|
| PROTOCOL '(' identifier ')' { $$ = protocol_expr ($3->name); }
|
||||||
| ENCODE '(' type ')' { $$ = encode_expr ($3.type); }
|
| ENCODE '(' abstract_decl ')' { $$ = encode_expr ($3->type); }
|
||||||
| obj_string /* FIXME string object? */
|
| obj_string /* FIXME string object? */
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue