LibCpp: Ignore the #error preprocessor directive

This commit is contained in:
Ali Mohammad Pur 2023-06-17 22:41:56 +03:30 committed by Andreas Kling
parent 543ccecc0b
commit 12a900b97c
Notes: sideshowbarker 2024-07-17 03:27:40 +09:00

View file

@ -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);