Rename “general” domain to “noninteger”
The “general” domain wasn’t really about general variables, but meant as a distinction from integer variables. For this reason, this commit renames the “general” domain to “noninteger.”
This commit is contained in:
@@ -148,7 +148,7 @@ struct FunctionDeclaration
|
||||
|
||||
std::string name;
|
||||
size_t arity;
|
||||
Domain domain{Domain::General};
|
||||
Domain domain{Domain::Noninteger};
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@@ -1,6 +1,7 @@
|
||||
#ifndef __ANTHEM__ARITHMETICS_H
|
||||
#define __ANTHEM__ARITHMETICS_H
|
||||
|
||||
#include <anthem/AST.h>
|
||||
#include <anthem/Utils.h>
|
||||
|
||||
namespace anthem
|
||||
@@ -59,7 +60,7 @@ struct IsTermArithmeticVisitor
|
||||
{
|
||||
switch (function.declaration->domain)
|
||||
{
|
||||
case Domain::General:
|
||||
case Domain::Noninteger:
|
||||
return EvaluationResult::False;
|
||||
case Domain::Integer:
|
||||
return EvaluationResult::True;
|
||||
@@ -127,7 +128,7 @@ struct IsTermArithmeticVisitor
|
||||
|
||||
switch (domain)
|
||||
{
|
||||
case Domain::General:
|
||||
case Domain::Noninteger:
|
||||
return EvaluationResult::False;
|
||||
case Domain::Integer:
|
||||
return EvaluationResult::True;
|
||||
@@ -184,7 +185,7 @@ struct IsTermIntegerVisitor
|
||||
{
|
||||
switch (function.declaration->domain)
|
||||
{
|
||||
case Domain::General:
|
||||
case Domain::Noninteger:
|
||||
return EvaluationResult::False;
|
||||
case Domain::Integer:
|
||||
return EvaluationResult::True;
|
||||
@@ -236,7 +237,7 @@ struct IsTermIntegerVisitor
|
||||
{
|
||||
switch (variable.declaration->domain)
|
||||
{
|
||||
case Domain::General:
|
||||
case Domain::Noninteger:
|
||||
return EvaluationResult::False;
|
||||
case Domain::Integer:
|
||||
return EvaluationResult::True;
|
||||
|
@@ -45,7 +45,7 @@ enum class OperationResult
|
||||
|
||||
enum class Domain
|
||||
{
|
||||
General,
|
||||
Noninteger,
|
||||
Integer,
|
||||
Unknown,
|
||||
};
|
||||
|
@@ -329,8 +329,8 @@ inline output::ColorStream &print(output::ColorStream &stream, const VariableDec
|
||||
{
|
||||
case Domain::Unknown:
|
||||
return "";
|
||||
case Domain::General:
|
||||
return "g";
|
||||
case Domain::Noninteger:
|
||||
return "n";
|
||||
case Domain::Integer:
|
||||
return "i";
|
||||
}
|
||||
|
Reference in New Issue
Block a user