mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-17 01:11:45 +00:00
[qfcc] Fix syntax error for id as a field name
event.e.mouse.id produced a syntax error, which is contrary to Objective-C.
This commit is contained in:
parent
e8c357393f
commit
dbbb8a1396
1 changed files with 8 additions and 1 deletions
|
@ -184,7 +184,7 @@ int yylex (void);
|
|||
%type <expr> optional_state_expr texpr vector_expr
|
||||
%type <expr> statement statements compound_statement
|
||||
%type <expr> else label break_label continue_label
|
||||
%type <expr> unary_expr cast_expr opt_arg_list arg_list
|
||||
%type <expr> unary_expr ident_expr cast_expr opt_arg_list arg_list
|
||||
%type <expr> init_var_decl_list init_var_decl
|
||||
%type <switch_block> switch_block
|
||||
%type <symbol> identifier
|
||||
|
@ -1288,6 +1288,7 @@ unary_expr
|
|||
| '(' expr ')' { $$ = $2; $$->paren = 1; }
|
||||
| unary_expr '(' opt_arg_list ')' { $$ = function_expr ($1, $3); }
|
||||
| unary_expr '[' expr ']' { $$ = array_expr ($1, $3); }
|
||||
| unary_expr '.' ident_expr { $$ = field_expr ($1, $3); }
|
||||
| unary_expr '.' unary_expr { $$ = field_expr ($1, $3); }
|
||||
| INCOP unary_expr { $$ = incop_expr ($1, $2, 0); }
|
||||
| unary_expr INCOP { $$ = incop_expr ($2, $1, 1); }
|
||||
|
@ -1306,6 +1307,12 @@ unary_expr
|
|||
| obj_expr { $$ = $1; }
|
||||
;
|
||||
|
||||
ident_expr
|
||||
: OBJECT { $$ = new_symbol_expr ($1); }
|
||||
| CLASS_NAME { $$ = new_symbol_expr ($1); }
|
||||
| TYPE_NAME { $$ = new_symbol_expr ($1); }
|
||||
;
|
||||
|
||||
vector_expr
|
||||
: '[' expr ',' arg_list ']'
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue