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:
Zoltan Herczeg
2019-12-20 09:55:41 +01:00
committed by GitHub
parent 2a29b72a83
commit 8cb2be6001
22 changed files with 873 additions and 234 deletions
+4
View File
@@ -210,6 +210,10 @@ typedef enum
typedef enum
{
SCANNER_FUNCTION_ARGUMENTS_NEEDED = (1 << 0), /**< arguments object needs to be created */
#if ENABLED (JERRY_ES2015)
SCANNER_FUNCTION_STATEMENT = (1 << 1), /**< function is (async) function statement */
SCANNER_FUNCTION_ASYNC = (1 << 2), /**< function is async function expression */
#endif /* ENABLED (JERRY_ES2015) */
} scanner_function_flags_t;
/**