@@ -986,6 +986,10 @@ xx_statement(R) ::= xx_return_statement(S) . {
986986 R = S;
987987}
988988
989+ xx_statement(R) ::= xx_yield_statement(S) . {
990+ R = S;
991+ }
992+
989993xx_statement(R) ::= xx_require_once_statement(S) . {
990994 R = S;
991995}
@@ -1526,16 +1530,31 @@ xx_fetch_statement(R) ::= xx_fetch_expr(E) DOTCOMMA . {
15261530 xx_ret_fetch_statement(&R, &E, status->scanner_state);
15271531}
15281532
1529- /* return statement */
1533+ /* return var; */
15301534xx_return_statement(R) ::= RETURN xx_common_expr(E) DOTCOMMA . {
15311535 xx_ret_return_statement(&R, &E, status->scanner_state);
15321536}
15331537
1534- /* return statement */
1538+ /* return; */
15351539xx_return_statement(R) ::= RETURN DOTCOMMA . {
15361540 xx_ret_return_statement(&R, NULL, status->scanner_state);
15371541}
15381542
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+
15391558/* require_once statement */
15401559xx_require_once_statement(R) ::= REQUIRE_ONCE xx_common_expr(E) DOTCOMMA . {
15411560 xx_ret_require_once_statement(&R, &E, status->scanner_state);
@@ -1906,7 +1925,7 @@ xx_common_expr(R) ::= NULL . {
19061925 xx_ret_literal(&R, XX_T_NULL, NULL, status->scanner_state);
19071926}
19081927
1909- /* y = false */
1928+ /* y = true */
19101929xx_common_expr(R) ::= TRUE . {
19111930 xx_ret_literal(&R, XX_T_TRUE, NULL, status->scanner_state);
19121931}
0 commit comments