mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:27:45 +00:00
LibCpp: Add preprocessor option to ignore unsupported keywords
Under some circumstances we need to ignore unsupported preprocessor keywords instead of crashing the processing, for example during live parsing in HackStudio.
This commit is contained in:
parent
711a47b784
commit
0b5d414eba
2 changed files with 11 additions and 2 deletions
|
@ -184,8 +184,11 @@ void Preprocessor::handle_preprocessor_line(const StringView& line)
|
|||
lexer.consume_all();
|
||||
return;
|
||||
}
|
||||
dbgln("Unsupported preprocessor keyword: {}", keyword);
|
||||
VERIFY_NOT_REACHED();
|
||||
|
||||
if (!m_options.ignore_unsupported_keywords) {
|
||||
dbgln("Unsupported preprocessor keyword: {}", keyword);
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
}
|
||||
|
||||
const String& Preprocessor::processed_text()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue