@@ -1230,6 +1230,7 @@ expr:
1230
1230
$$ = $2 ;
1231
1231
if ($$ ->kind == ZEND_AST_CONDITIONAL) $$ ->attr = ZEND_PARENTHESIZED_CONDITIONAL;
1232
1232
}
1233
+ | new_dereferenceable { $$ = $1 ; }
1233
1234
| new_non_dereferenceable { $$ = $1 ; }
1234
1235
| expr ' ?' expr ' :' expr
1235
1236
{ $$ = zend_ast_create(ZEND_AST_CONDITIONAL, $1 , $3 , $5 ); }
@@ -1329,6 +1330,8 @@ function_call:
1329
1330
{ $$ = zend_ast_create(ZEND_AST_STATIC_CALL, $1 , $3 , $4 ); }
1330
1331
| variable_class_name T_PAAMAYIM_NEKUDOTAYIM member_name argument_list
1331
1332
{ $$ = zend_ast_create(ZEND_AST_STATIC_CALL, $1 , $3 , $4 ); }
1333
+ | new_dereferenceable T_PAAMAYIM_NEKUDOTAYIM member_name argument_list
1334
+ { $$ = zend_ast_create(ZEND_AST_STATIC_CALL, $1 , $3 , $4 ); }
1332
1335
| callable_expr { $<num>$ = CG(zend_lineno); } argument_list {
1333
1336
$$ = zend_ast_create(ZEND_AST_CALL, $1 , $3 );
1334
1337
$$ ->lineno = $<num>2 ;
@@ -1403,10 +1406,14 @@ class_constant:
1403
1406
{ $$ = zend_ast_create_class_const_or_name($1 , $3 ); }
1404
1407
| variable_class_name T_PAAMAYIM_NEKUDOTAYIM identifier
1405
1408
{ $$ = zend_ast_create_class_const_or_name($1 , $3 ); }
1409
+ | new_dereferenceable T_PAAMAYIM_NEKUDOTAYIM identifier
1410
+ { $$ = zend_ast_create_class_const_or_name($1 , $3 ); }
1406
1411
| class_name T_PAAMAYIM_NEKUDOTAYIM ' {' expr ' }'
1407
1412
{ $$ = zend_ast_create(ZEND_AST_CLASS_CONST, $1 , $4 ); }
1408
1413
| variable_class_name T_PAAMAYIM_NEKUDOTAYIM ' {' expr ' }'
1409
1414
{ $$ = zend_ast_create(ZEND_AST_CLASS_CONST, $1 , $4 ); }
1415
+ | new_dereferenceable T_PAAMAYIM_NEKUDOTAYIM ' {' expr ' }'
1416
+ { $$ = zend_ast_create(ZEND_AST_CLASS_CONST, $1 , $4 ); }
1410
1417
;
1411
1418
1412
1419
optional_expr :
@@ -1428,12 +1435,14 @@ fully_dereferenceable:
1428
1435
array_object_dereferenceable :
1429
1436
fully_dereferenceable { $$ = $1 ; }
1430
1437
| constant { $$ = $1 ; }
1438
+ | new_dereferenceable { $$ = $1 ; }
1431
1439
;
1432
1440
1433
1441
callable_expr :
1434
1442
callable_variable { $$ = $1 ; }
1435
1443
| ' (' expr ' )' { $$ = $2 ; }
1436
1444
| dereferenceable_scalar { $$ = $1 ; }
1445
+ | new_dereferenceable { $$ = $1 ; }
1437
1446
;
1438
1447
1439
1448
callable_variable :
@@ -1448,7 +1457,6 @@ callable_variable:
1448
1457
| array_object_dereferenceable T_NULLSAFE_OBJECT_OPERATOR property_name argument_list
1449
1458
{ $$ = zend_ast_create(ZEND_AST_NULLSAFE_METHOD_CALL, $1 , $3 , $4 ); }
1450
1459
| function_call { $$ = $1 ; }
1451
- | new_dereferenceable { $$ = $1 ; }
1452
1460
;
1453
1461
1454
1462
variable :
@@ -1473,6 +1481,8 @@ static_member:
1473
1481
{ $$ = zend_ast_create(ZEND_AST_STATIC_PROP, $1 , $3 ); }
1474
1482
| variable_class_name T_PAAMAYIM_NEKUDOTAYIM simple_variable
1475
1483
{ $$ = zend_ast_create(ZEND_AST_STATIC_PROP, $1 , $3 ); }
1484
+ | new_dereferenceable T_PAAMAYIM_NEKUDOTAYIM simple_variable
1485
+ { $$ = zend_ast_create(ZEND_AST_STATIC_PROP, $1 , $3 ); }
1476
1486
;
1477
1487
1478
1488
new_variable :
0 commit comments