Add hint for permissive mode when parsing fails within event handlerset

This commit is contained in:
Jan 2021-11-28 18:03:27 +01:00
parent b082e471e7
commit 8bf0126e38

View File

@ -138,6 +138,10 @@ std::unique_ptr<ParsingResult> MenuFileReader::ReadMenuFile()
if (!parser->Parse()) if (!parser->Parse())
{ {
std::cout << "Parsing menu file failed!" << std::endl; std::cout << "Parsing menu file failed!" << std::endl;
const auto* parserEndState = parser->GetState();
if(parserEndState->m_current_event_handler_set && !parserEndState->m_permissive_mode)
std::cout << "You can use the --menu-permissive option to try to compile the event handler script anyway." << std::endl;
return nullptr; return nullptr;
} }