@@ -234,7 +234,7 @@ static YYSIZE_T zend_yytnamerr(char*, const char*);
234
234
%type <ast> unprefixed_use_declarations const_decl inner_statement
235
235
%type <ast> expr optional_expr while_statement for_statement foreach_variable
236
236
%type <ast> foreach_statement declare_statement finally_statement unset_variable variable
237
- %type <ast> extends_from parameter optional_type argument expr_without_variable global_var
237
+ %type <ast> extends_from parameter optional_type argument global_var
238
238
%type <ast> static_var class_statement trait_adaptation trait_precedence trait_alias
239
239
%type <ast> absolute_trait_method_reference trait_method_reference property echo_expr
240
240
%type <ast> new_expr anonymous_class class_name class_name_reference simple_variable
@@ -871,8 +871,10 @@ new_expr:
871
871
{ $$ = $2 ; }
872
872
;
873
873
874
- expr_without_variable :
875
- T_LIST ' (' array_pair_list ' )' ' =' expr
874
+ expr :
875
+ variable
876
+ { $$ = $1 ; }
877
+ | T_LIST ' (' array_pair_list ' )' ' =' expr
876
878
{ $3 ->attr = ZEND_ARRAY_SYNTAX_LIST; $$ = zend_ast_create(ZEND_AST_ASSIGN, $3 , $6 ); }
877
879
| ' [' array_pair_list ' ]' ' =' expr
878
880
{ $2 ->attr = ZEND_ARRAY_SYNTAX_SHORT; $$ = zend_ast_create(ZEND_AST_ASSIGN, $2 , $5 ); }
@@ -1100,11 +1102,6 @@ constant:
1100
1102
{ $$ = zend_ast_create(ZEND_AST_CLASS_CONST, $1 , $3 ); }
1101
1103
;
1102
1104
1103
- expr :
1104
- variable { $$ = $1 ; }
1105
- | expr_without_variable { $$ = $1 ; }
1106
- ;
1107
-
1108
1105
optional_expr :
1109
1106
/* empty */ { $$ = NULL ; }
1110
1107
| expr { $$ = $1 ; }
0 commit comments