Skip to content

Commit 66cf76e

Browse files
committed
Remove expr_without_variable
We no longer need this distinction.
1 parent e03739d commit 66cf76e

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

Zend/zend_language_parser.y

+5-8
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ static YYSIZE_T zend_yytnamerr(char*, const char*);
234234
%type <ast> unprefixed_use_declarations const_decl inner_statement
235235
%type <ast> expr optional_expr while_statement for_statement foreach_variable
236236
%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
238238
%type <ast> static_var class_statement trait_adaptation trait_precedence trait_alias
239239
%type <ast> absolute_trait_method_reference trait_method_reference property echo_expr
240240
%type <ast> new_expr anonymous_class class_name class_name_reference simple_variable
@@ -871,8 +871,10 @@ new_expr:
871871
{ $$ = $2; }
872872
;
873873

874-
expr_without_variable:
875-
T_LIST '(' array_pair_list ')' '=' expr
874+
expr:
875+
variable
876+
{ $$ = $1; }
877+
| T_LIST '(' array_pair_list ')' '=' expr
876878
{ $3->attr = ZEND_ARRAY_SYNTAX_LIST; $$ = zend_ast_create(ZEND_AST_ASSIGN, $3, $6); }
877879
| '[' array_pair_list ']' '=' expr
878880
{ $2->attr = ZEND_ARRAY_SYNTAX_SHORT; $$ = zend_ast_create(ZEND_AST_ASSIGN, $2, $5); }
@@ -1100,11 +1102,6 @@ constant:
11001102
{ $$ = zend_ast_create(ZEND_AST_CLASS_CONST, $1, $3); }
11011103
;
11021104

1103-
expr:
1104-
variable { $$ = $1; }
1105-
| expr_without_variable { $$ = $1; }
1106-
;
1107-
11081105
optional_expr:
11091106
/* empty */ { $$ = NULL; }
11101107
| expr { $$ = $1; }

0 commit comments

Comments
 (0)