mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:57:44 +00:00
LibJS: Parse async generator functions
This commit is contained in:
parent
5d0f666f22
commit
0982a73d1d
13 changed files with 270 additions and 40 deletions
|
@ -1938,7 +1938,9 @@ 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::Async ? " async" : "", m_kind == FunctionKind::Generator ? "*" : "", name());
|
||||
auto is_async = m_kind == FunctionKind::Async || m_kind == FunctionKind::AsyncGenerator;
|
||||
auto is_generator = m_kind == FunctionKind::Generator || m_kind == FunctionKind::AsyncGenerator;
|
||||
outln("{}{}{} '{}'", class_name, is_async ? " async" : "", is_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