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
@@ -956,6 +956,14 @@ parser_error_to_string (parser_error_t error) /**< error code */
{
return "for in-of loop variable declaration may not have an initializer.";
}
case PARSER_ERR_FOR_AWAIT_NO_ASYNC:
{
return "for-await-of is only allowed inside async functions and generators.";
}
case PARSER_ERR_FOR_AWAIT_NO_OF:
{
return "only 'of' form is allowed for for-await loops.";
}
case PARSER_ERR_DUPLICATED_PROTO:
{
return "Duplicate __proto__ fields are not allowed in object literals.";