]> granicus.if.org Git - php/commitdiff
Remove expr_without_variable
authorNikita Popov <nikita.ppv@gmail.com>
Sun, 24 Jun 2018 11:34:32 +0000 (13:34 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Sun, 24 Jun 2018 11:44:54 +0000 (13:44 +0200)
We no longer need this distinction.

Zend/zend_language_parser.y

index 5911637716774d2b4efde6a7495c75b6c8fcaf50..9e4397aa92b88b4209d9c881244f0d944a11f29f 100644 (file)
@@ -234,7 +234,7 @@ static YYSIZE_T zend_yytnamerr(char*, const char*);
 %type <ast> unprefixed_use_declarations const_decl inner_statement
 %type <ast> expr optional_expr while_statement for_statement foreach_variable
 %type <ast> foreach_statement declare_statement finally_statement unset_variable variable
-%type <ast> extends_from parameter optional_type argument expr_without_variable global_var
+%type <ast> extends_from parameter optional_type argument global_var
 %type <ast> static_var class_statement trait_adaptation trait_precedence trait_alias
 %type <ast> absolute_trait_method_reference trait_method_reference property echo_expr
 %type <ast> new_expr anonymous_class class_name class_name_reference simple_variable
@@ -871,8 +871,10 @@ new_expr:
                        { $$ = $2; }
 ;
 
-expr_without_variable:
-               T_LIST '(' array_pair_list ')' '=' expr
+expr:
+               variable
+                       { $$ = $1; }
+       |       T_LIST '(' array_pair_list ')' '=' expr
                        { $3->attr = ZEND_ARRAY_SYNTAX_LIST; $$ = zend_ast_create(ZEND_AST_ASSIGN, $3, $6); }
        |       '[' array_pair_list ']' '=' expr
                        { $2->attr = ZEND_ARRAY_SYNTAX_SHORT; $$ = zend_ast_create(ZEND_AST_ASSIGN, $2, $5); }
@@ -1100,11 +1102,6 @@ constant:
                        { $$ = zend_ast_create(ZEND_AST_CLASS_CONST, $1, $3); }
 ;
 
-expr:
-               variable                                        { $$ = $1; }
-       |       expr_without_variable           { $$ = $1; }
-;
-
 optional_expr:
                /* empty */     { $$ = NULL; }
        |       expr            { $$ = $1; }