mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:48:12 +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
|
@ -1921,7 +1921,7 @@ void BindingPattern::dump(int indent) const
|
|||
void FunctionNode::dump(int indent, String const& class_name) const
|
||||
{
|
||||
print_indent(indent);
|
||||
outln("{}{} '{}'", class_name, m_kind == FunctionKind::Generator ? "*" : "", name());
|
||||
outln("{}{}{} '{}'", class_name, m_kind == FunctionKind::Async ? " async" : "", m_kind == FunctionKind::Generator ? "*" : "", name());
|
||||
if (m_contains_direct_call_to_eval) {
|
||||
print_indent(indent + 1);
|
||||
outln("\033[31;1m(direct eval)\033[0m");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue