patrick
/
plasp
Archived
1
0
Fork 0

Allowing primitive type »objects« for compatibility.

This commit is contained in:
Patrick Lühne 2016-06-10 16:46:02 +02:00
parent 9f0e784a4a
commit 20b40d3e1c
1 changed files with 4 additions and 1 deletions

View File

@ -121,8 +121,11 @@ PrimitiveType *PrimitiveType::parseAndFind(Context &context, Domain &domain)
if (match == types.cend())
{
// Only "object" is allowed as an implicit type
if (typeName == "object")
if (typeName == "object" || typeName == "objects")
{
context.logger.parserWarning(context.parser, "Primitive type \"" + typeName + "\" should be declared");
types.emplace_back(std::make_unique<expressions::PrimitiveType>(typeName));
}
else
throw utils::ParserException(context.parser, "Type \"" + typeName + "\" used but never declared");