mirror of
https://github.com/php/php-src.git
synced 2024-11-27 11:53:33 +08:00
Remove expr_without_variable
We no longer need this distinction.
This commit is contained in:
parent
e03739d4ab
commit
66cf76ee54
@ -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; }
|
||||
|
Loading…
Reference in New Issue
Block a user