Make ZoneDefinition sequences also accept eof instead of new line

This commit is contained in:
Jan
2021-03-10 15:17:36 +01:00
parent 8798779b39
commit 9b15afa70e
6 changed files with 24 additions and 8 deletions

View File

@ -13,7 +13,10 @@ std::unique_ptr<ZoneDefinitionCommonMatchers::matcher_t> ZoneDefinitionCommonMat
create.Identifier(),
create.AnyCharBesides({',', '<', '>', '"', '\\', '*', '?', '|', ':'})
})),
create.Type(SimpleParserValueType::NEW_LINE).NoConsume()
create.Or({
create.Type(SimpleParserValueType::NEW_LINE),
create.Type(SimpleParserValueType::END_OF_FILE)
}).NoConsume()
}).Transform([](SimpleMatcherFactory::token_list_t& tokens)
{
std::ostringstream str;