LibJS: Allow yielding a class

This commit is contained in:
davidot 2021-07-29 02:03:38 +02:00 committed by Linus Groh
parent 19582ccad8
commit 4989e79c45
Notes: sideshowbarker 2024-07-18 05:36:46 +09:00

View file

@ -1630,7 +1630,7 @@ NonnullRefPtr<YieldExpression> Parser::parse_yield_expression()
yield_from = true;
}
if (yield_from || match_expression())
if (yield_from || match_expression() || match(TokenType::Class))
argument = parse_expression(0);
}