diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2018-06-24 13:34:32 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2018-06-24 13:44:54 +0200 |
commit | 66cf76ee5412353b2a070f42dec7fc618f41e8eb (patch) | |
tree | 3799ec480379066ba639fb5c4519973d1170032c | |
parent | e03739d4ab46b234709bdaa29280e16af94884c4 (diff) | |
download | php-git-66cf76ee5412353b2a070f42dec7fc618f41e8eb.tar.gz |
Remove expr_without_variable
We no longer need this distinction.
-rw-r--r-- | Zend/zend_language_parser.y | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y index 5911637716..9e4397aa92 100644 --- a/Zend/zend_language_parser.y +++ b/Zend/zend_language_parser.y @@ -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; } |