summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Parser.cpp
diff options
context:
space:
mode:
authordavidot <david.tuin@gmail.com>2021-07-29 02:03:38 +0200
committerLinus Groh <mail@linusgroh.de>2021-08-16 23:20:04 +0100
commit4989e79c456b73ee418175e288acf548082ac1bd (patch)
tree2149ac8b08bacbaee0abb75f31b618f392f02df7 /Userland/Libraries/LibJS/Parser.cpp
parent19582ccad883aae58dd645753c6ef109fb5e4ed2 (diff)
downloadserenity-4989e79c456b73ee418175e288acf548082ac1bd.zip
LibJS: Allow yielding a class
Diffstat (limited to 'Userland/Libraries/LibJS/Parser.cpp')
-rw-r--r--Userland/Libraries/LibJS/Parser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Parser.cpp b/Userland/Libraries/LibJS/Parser.cpp
index e9bc4f25a5..811bad23a5 100644
--- a/Userland/Libraries/LibJS/Parser.cpp
+++ b/Userland/Libraries/LibJS/Parser.cpp
@@ -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);
}