Remove Constant class
Constants are not a construct present in Clingo’s AST and were unintentionally made part of anthem’s AST. This removes the unused classes for clarity.
This commit is contained in:
@@ -103,13 +103,6 @@ Comparison prepareCopy(const Comparison &other)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Constant prepareCopy(const Constant &other)
|
||||
{
|
||||
return Constant(std::string(other.name));
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Function prepareCopy(const Function &other)
|
||||
{
|
||||
return Function(std::string(other.name), prepareCopy(other.arguments));
|
||||
@@ -293,11 +286,6 @@ struct FixDanglingVariablesInTermVisitor
|
||||
{
|
||||
}
|
||||
|
||||
template <class... Arguments>
|
||||
void visit(Constant &, Arguments &&...)
|
||||
{
|
||||
}
|
||||
|
||||
template <class... Arguments>
|
||||
void visit(Function &function, Arguments &&... arguments)
|
||||
{
|
||||
|
@@ -150,10 +150,6 @@ struct CollectFreeVariablesVisitor
|
||||
binaryOperation.right.accept(*this, variableStack, freeVariables);
|
||||
}
|
||||
|
||||
void visit(Constant &, VariableStack &, std::vector<VariableDeclaration *> &)
|
||||
{
|
||||
}
|
||||
|
||||
void visit(Function &function, VariableStack &variableStack, std::vector<VariableDeclaration *> &freeVariables)
|
||||
{
|
||||
for (auto &argument : function.arguments)
|
||||
|
Reference in New Issue
Block a user