mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:17:44 +00:00
LibJS: Add support for async functions
This commit adds support for the most bare bones version of async functions, support for async generator functions, async arrow functions and await expressions are TODO.
This commit is contained in:
parent
05c3320da3
commit
681787de76
17 changed files with 399 additions and 36 deletions
|
@ -31,6 +31,7 @@ struct FunctionNodeParseOptions {
|
|||
IsSetterFunction = 1 << 4,
|
||||
IsArrowFunction = 1 << 5,
|
||||
IsGeneratorFunction = 1 << 6,
|
||||
IsAsyncFunction = 1 << 7,
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -251,6 +252,7 @@ private:
|
|||
bool in_function_context { false };
|
||||
bool in_formal_parameter_context { false };
|
||||
bool in_generator_function_context { false };
|
||||
bool in_async_function_context { false };
|
||||
bool in_arrow_function_context { false };
|
||||
bool in_break_context { false };
|
||||
bool in_continue_context { false };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue