Skip to content

Commit

Permalink
LibJS: Allow yielding a class
Browse files Browse the repository at this point in the history
  • Loading branch information
davidot authored and linusg committed Aug 16, 2021
1 parent 19582cc commit 4989e79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Userland/Libraries/LibJS/Parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 4989e79

Please sign in to comment.