mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 19:29:16 +00:00
LibJS: Fix semicolon insertion
This commit is contained in:
committed by
Andreas Kling
parent
07f838dc4e
commit
19cdda8000
@@ -1088,8 +1088,8 @@ void Parser::consume_or_insert_semicolon()
|
||||
// ...token is preceeded by one or more newlines
|
||||
if (m_parser_state.m_current_token.trivia().contains('\n'))
|
||||
return;
|
||||
// ...token is a closing paren
|
||||
if (match(TokenType::ParenClose))
|
||||
// ...token is a closing curly brace
|
||||
if (match(TokenType::CurlyClose))
|
||||
return;
|
||||
// ...token is eof
|
||||
if (match(TokenType::Eof))
|
||||
|
||||
Reference in New Issue
Block a user