Explorar el Código

LibCpp: Ignore the #error preprocessor directive

Ali Mohammad Pur hace 2 años
padre
commit
12a900b97c
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      Userland/Libraries/LibCpp/Preprocessor.cpp

+ 4 - 0
Userland/Libraries/LibCpp/Preprocessor.cpp

@@ -230,6 +230,10 @@ void Preprocessor::handle_preprocessor_keyword(StringView keyword, GenericLexer&
         line_lexer.consume_all();
         return;
     }
+    if (keyword == "error") {
+        line_lexer.consume_all();
+        return;
+    }
 
     if (!m_options.ignore_unsupported_keywords) {
         dbgln("Unsupported preprocessor keyword: {}", keyword);