diff options
author | Stephan Unverwerth <s.unverwerth@gmx.de> | 2020-04-17 15:27:51 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-04-17 15:32:20 +0200 |
commit | 19cdda80000f31e96db2cbc85f051250621d9241 (patch) | |
tree | 55f63fc482dd98bd519aa7ebc24558facc0c9625 /Libraries | |
parent | 07f838dc4e0a9c1a6f3b50da8fbb158d610928e4 (diff) | |
download | serenity-19cdda80000f31e96db2cbc85f051250621d9241.zip |
LibJS: Fix semicolon insertion
Diffstat (limited to 'Libraries')
-rw-r--r-- | Libraries/LibJS/Parser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Libraries/LibJS/Parser.cpp b/Libraries/LibJS/Parser.cpp index e4fceb1461..18a1feecf3 100644 --- a/Libraries/LibJS/Parser.cpp +++ b/Libraries/LibJS/Parser.cpp @@ -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)) |