mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-10 09:02:44 +02:00
LibJS: Don't allow TryStatement without catch clause
This commit is contained in:
@@ -1421,10 +1421,7 @@ NonnullRefPtr<TryStatement> Parser::parse_try_statement()
|
||||
consume(TokenType::Try);
|
||||
|
||||
auto block = parse_block_statement();
|
||||
|
||||
RefPtr<CatchClause> handler;
|
||||
if (match(TokenType::Catch))
|
||||
handler = parse_catch_clause();
|
||||
auto handler = parse_catch_clause();
|
||||
|
||||
RefPtr<BlockStatement> finalizer;
|
||||
if (match(TokenType::Finally)) {
|
||||
|
||||
Reference in New Issue
Block a user