@@ -946,6 +946,10 @@ xx_parameter_type(R) ::= TYPE_RESOURCE . {
946
946
xx_ret_type(&R, XX_TYPE_RESOURCE);
947
947
}
948
948
949
+ xx_parameter_type(R) ::= TYPE_MIXED . {
950
+ xx_ret_type(&R, XX_TYPE_MIXED);
951
+ }
952
+
949
953
xx_parameter_type(R) ::= TYPE_OBJECT . {
950
954
xx_ret_type(&R, XX_TYPE_OBJECT);
951
955
}
@@ -982,6 +986,10 @@ xx_statement(R) ::= xx_return_statement(S) . {
982
986
R = S;
983
987
}
984
988
989
+ xx_statement(R) ::= xx_yield_statement(S) . {
990
+ R = S;
991
+ }
992
+
985
993
xx_statement(R) ::= xx_require_once_statement(S) . {
986
994
R = S;
987
995
}
@@ -1522,16 +1530,31 @@ xx_fetch_statement(R) ::= xx_fetch_expr(E) DOTCOMMA . {
1522
1530
xx_ret_fetch_statement(&R, &E, status->scanner_state);
1523
1531
}
1524
1532
1525
- /* return statement */
1533
+ /* return var; */
1526
1534
xx_return_statement(R) ::= RETURN xx_common_expr(E) DOTCOMMA . {
1527
1535
xx_ret_return_statement(&R, &E, status->scanner_state);
1528
1536
}
1529
1537
1530
- /* return statement */
1538
+ /* return; */
1531
1539
xx_return_statement(R) ::= RETURN DOTCOMMA . {
1532
1540
xx_ret_return_statement(&R, NULL, status->scanner_state);
1533
1541
}
1534
1542
1543
+ /* yield var; */
1544
+ xx_yield_statement(R) ::= YIELD xx_common_expr(E) DOTCOMMA . {
1545
+ xx_ret_yield_statement(&R, &E, NULL, NULL, status->scanner_state);
1546
+ }
1547
+
1548
+ /* yield key, val; */
1549
+ xx_yield_statement(R) ::= YIELD xx_common_expr(K) COMMA xx_common_expr(V) DOTCOMMA . {
1550
+ xx_ret_yield_statement(&R, NULL, &K, &V, status->scanner_state);
1551
+ }
1552
+
1553
+ /* yield; */
1554
+ xx_yield_statement(R) ::= YIELD DOTCOMMA . {
1555
+ xx_ret_yield_statement(&R, NULL, NULL, NULL, status->scanner_state);
1556
+ }
1557
+
1535
1558
/* require_once statement */
1536
1559
xx_require_once_statement(R) ::= REQUIRE_ONCE xx_common_expr(E) DOTCOMMA . {
1537
1560
xx_ret_require_once_statement(&R, &E, status->scanner_state);
@@ -1596,6 +1619,10 @@ xx_declare_statement(R) ::= TYPE_ARRAY xx_declare_variable_list(L) DOTCOMMA . {
1596
1619
xx_ret_declare_statement(&R, XX_T_TYPE_ARRAY, &L, status->scanner_state);
1597
1620
}
1598
1621
1622
+ xx_declare_statement(R) ::= TYPE_MIXED xx_declare_variable_list(L) DOTCOMMA . {
1623
+ xx_ret_declare_statement(&R, XX_T_TYPE_MIXED, &L, status->scanner_state);
1624
+ }
1625
+
1599
1626
xx_declare_variable_list(R) ::= xx_declare_variable_list(L) COMMA xx_declare_variable(V) . {
1600
1627
xx_ret_list(&R, &L, &V, status->scanner_state);
1601
1628
}
@@ -1898,7 +1925,7 @@ xx_common_expr(R) ::= NULL . {
1898
1925
xx_ret_literal(&R, XX_T_NULL, NULL, status->scanner_state);
1899
1926
}
1900
1927
1901
- /* y = false */
1928
+ /* y = true */
1902
1929
xx_common_expr(R) ::= TRUE . {
1903
1930
xx_ret_literal(&R, XX_T_TRUE, NULL, status->scanner_state);
1904
1931
}
0 commit comments