mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 08:35:09 +00:00
LibJS: Don't allow TryStatement without catch clause
This commit is contained in:
parent
82ac936a9d
commit
80bb22788f
1 changed files with 1 additions and 4 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue