Implement for-await-of statement. (#3946)

AsyncIteratorClose has not supported yet.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2020-06-30 11:21:50 +02:00
committed by GitHub
parent 0b404ea893
commit 5535ea88ac
20 changed files with 729 additions and 199 deletions
+8
View File
@@ -1181,6 +1181,14 @@ scanner_scan_statement (parser_context_t *context_p, /**< context */
case LEXER_KEYW_FOR:
{
lexer_next_token (context_p);
#if ENABLED (JERRY_ESNEXT)
if (context_p->token.type == LEXER_KEYW_AWAIT)
{
lexer_next_token (context_p);
}
#endif /* ENABLED (JERRY_ESNEXT) */
if (context_p->token.type != LEXER_LEFT_PAREN)
{
scanner_raise_error (context_p);