Checking that type declarations are not missing.

This commit is contained in:
Patrick Lühne 2016-06-08 13:34:41 +02:00
parent f2089f48b8
commit c99b7018c6

View File

@ -109,7 +109,8 @@ PrimitiveType *PrimitiveType::parseAndFind(Context &context, Domain &domain)
const auto typeName = context.parser.parseIdentifier(isIdentifier);
BOOST_ASSERT(!typeName.empty());
if (typeName.empty())
throw utils::ParserException(context.parser, "No type supplied");
const auto match = std::find_if(types.cbegin(), types.cend(),
[&](const auto &primitiveType)