Implement the core of the generator functions. (#3368)

Some things are missing:
 - yield* support
 - generator definition in object literal
 - the hidden GeneratorFunction

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2019-11-28 11:54:27 +01:00
committed by Dániel Bátyai
parent 14e95a4775
commit 110f75c99d
35 changed files with 1535 additions and 85 deletions
+6
View File
@@ -932,6 +932,12 @@ parser_error_to_string (parser_error_t error) /**< error code */
{
return "Arguments is not allowed to be used here in strict mode.";
}
#if ENABLED (JERRY_ES2015)
case PARSER_ERR_YIELD_NOT_ALLOWED:
{
return "Incorrect use of yield keyword.";
}
#endif /* ENABLED (JERRY_ES2015) */
case PARSER_ERR_DELETE_IDENT_NOT_ALLOWED:
{
return "Deleting identifier is not allowed in strict mode.";