mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 02:48:11 +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);
|
consume(TokenType::Try);
|
||||||
|
|
||||||
auto block = parse_block_statement();
|
auto block = parse_block_statement();
|
||||||
|
auto handler = parse_catch_clause();
|
||||||
RefPtr<CatchClause> handler;
|
|
||||||
if (match(TokenType::Catch))
|
|
||||||
handler = parse_catch_clause();
|
|
||||||
|
|
||||||
RefPtr<BlockStatement> finalizer;
|
RefPtr<BlockStatement> finalizer;
|
||||||
if (match(TokenType::Finally)) {
|
if (match(TokenType::Finally)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue