Переглянути джерело

LibJS: Fix semicolon insertion

Stephan Unverwerth 5 роки тому
батько
коміт
19cdda8000
1 змінених файлів з 2 додано та 2 видалено
  1. 2 2
      Libraries/LibJS/Parser.cpp

+ 2 - 2
Libraries/LibJS/Parser.cpp

@@ -1088,8 +1088,8 @@ void Parser::consume_or_insert_semicolon()
     // ...token is preceeded by one or more newlines
     // ...token is preceeded by one or more newlines
     if (m_parser_state.m_current_token.trivia().contains('\n'))
     if (m_parser_state.m_current_token.trivia().contains('\n'))
         return;
         return;
-    // ...token is a closing paren
-    if (match(TokenType::ParenClose))
+    // ...token is a closing curly brace
+    if (match(TokenType::CurlyClose))
         return;
         return;
     // ...token is eof
     // ...token is eof
     if (match(TokenType::Eof))
     if (match(TokenType::Eof))