Fixed misleading error message concerning negated, unsupported body literals.
This commit is contained in:
@@ -144,8 +144,11 @@ struct BodyLiteralTranslateVisitor
|
||||
|
||||
struct BodyBodyLiteralTranslateVisitor
|
||||
{
|
||||
std::experimental::optional<ast::Formula> visit(const Clingo::AST::Literal &literal, const Clingo::AST::BodyLiteral &, Context &context)
|
||||
std::experimental::optional<ast::Formula> visit(const Clingo::AST::Literal &literal, const Clingo::AST::BodyLiteral &bodyLiteral, Context &context)
|
||||
{
|
||||
if (bodyLiteral.sign != Clingo::AST::Sign::None)
|
||||
throwErrorAtLocation(bodyLiteral.location, "only positive body literals supported currently", context);
|
||||
|
||||
return literal.data.accept(BodyLiteralTranslateVisitor(), literal, context);
|
||||
}
|
||||
|
||||
|
@@ -65,9 +65,6 @@ struct StatementVisitor
|
||||
{
|
||||
const auto &bodyLiteral = *i;
|
||||
|
||||
if (bodyLiteral.sign != Clingo::AST::Sign::None)
|
||||
throwErrorAtLocation(bodyLiteral.location, "only positive literals currently supported", context);
|
||||
|
||||
auto argument = bodyLiteral.data.accept(BodyBodyLiteralTranslateVisitor(), bodyLiteral, context);
|
||||
|
||||
if (!argument)
|
||||
|
Reference in New Issue
Block a user