Support parsing async modifiers for functions. (#3460)
Only parsing is implemented, so the async functions currently behave like normal function except they return with a resolved Promise object when the function is terminated correctly. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
@@ -670,6 +670,18 @@ scanner_pop_literal_pool (parser_context_t *context_p, /**< context */
|
||||
}
|
||||
}
|
||||
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
if (literal_pool_p->status_flags & SCANNER_LITERAL_POOL_ASYNC)
|
||||
{
|
||||
status_flags |= SCANNER_FUNCTION_ASYNC;
|
||||
|
||||
if (literal_pool_p->status_flags & SCANNER_LITERAL_POOL_FUNCTION_STATEMENT)
|
||||
{
|
||||
status_flags |= SCANNER_FUNCTION_STATEMENT;
|
||||
}
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
|
||||
info_p->u8_arg = status_flags;
|
||||
info_p->u16_arg = (uint16_t) no_declarations;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user