@@ -544,8 +544,8 @@ implements_list:
544
544
foreach_variable :
545
545
variable { $$ = $1 ; }
546
546
| ' &' variable { $$ = zend_ast_create(ZEND_AST_REF, $2 ); }
547
- | T_LIST ' (' array_pair_list ' )' { $3 ->attr = 1 ; $$ = $3 ; }
548
- | ' [' array_pair_list ' ]' { $$ = $2 ; }
547
+ | T_LIST ' (' array_pair_list ' )' { $$ = $3 ; $$ ->attr = ZEND_ARRAY_SYNTAX_LIST ; }
548
+ | ' [' array_pair_list ' ]' { $$ = $2 ; $$ ->attr = ZEND_ARRAY_SYNTAX_SHORT; }
549
549
;
550
550
551
551
for_statement :
@@ -866,9 +866,9 @@ new_expr:
866
866
867
867
expr_without_variable :
868
868
T_LIST ' (' array_pair_list ' )' ' =' expr
869
- { $3 ->attr = 1 ; $$ = zend_ast_create(ZEND_AST_ASSIGN, $3 , $6 ); }
869
+ { $3 ->attr = ZEND_ARRAY_SYNTAX_LIST ; $$ = zend_ast_create(ZEND_AST_ASSIGN, $3 , $6 ); }
870
870
| ' [' array_pair_list ' ]' ' =' expr
871
- { $$ = zend_ast_create(ZEND_AST_ASSIGN, $2 , $5 ); }
871
+ { $2 ->attr = ZEND_ARRAY_SYNTAX_SHORT; $ $ = zend_ast_create(ZEND_AST_ASSIGN, $2 , $5 ); }
872
872
| variable ' =' expr
873
873
{ $$ = zend_ast_create(ZEND_AST_ASSIGN, $1 , $3 ); }
874
874
| variable ' =' ' &' variable
@@ -1060,8 +1060,8 @@ ctor_arguments:
1060
1060
1061
1061
1062
1062
dereferencable_scalar :
1063
- T_ARRAY ' (' array_pair_list ' )' { $$ = $3 ; }
1064
- | ' [' array_pair_list ' ]' { $$ = $2 ; }
1063
+ T_ARRAY ' (' array_pair_list ' )' { $$ = $3 ; $$ ->attr = ZEND_ARRAY_SYNTAX_LONG; }
1064
+ | ' [' array_pair_list ' ]' { $$ = $2 ; $$ ->attr = ZEND_ARRAY_SYNTAX_SHORT; }
1065
1065
| T_CONSTANT_ENCAPSED_STRING { $$ = $1 ; }
1066
1066
;
1067
1067
@@ -1209,9 +1209,11 @@ array_pair:
1209
1209
| ' &' variable
1210
1210
{ $$ = zend_ast_create_ex(ZEND_AST_ARRAY_ELEM, 1 , $2 , NULL ); }
1211
1211
| expr T_DOUBLE_ARROW T_LIST ' (' array_pair_list ' )'
1212
- { $5 ->attr = 1 ; $$ = zend_ast_create(ZEND_AST_ARRAY_ELEM, $5 , $1 ); }
1212
+ { $5 ->attr = ZEND_ARRAY_SYNTAX_LIST;
1213
+ $$ = zend_ast_create(ZEND_AST_ARRAY_ELEM, $5 , $1 ); }
1213
1214
| T_LIST ' (' array_pair_list ' )'
1214
- { $3 ->attr = 1 ; $$ = zend_ast_create(ZEND_AST_ARRAY_ELEM, $3 , NULL ); }
1215
+ { $3 ->attr = ZEND_ARRAY_SYNTAX_LIST;
1216
+ $$ = zend_ast_create(ZEND_AST_ARRAY_ELEM, $3 , NULL ); }
1215
1217
;
1216
1218
1217
1219
encaps_list :
0 commit comments