Remove unnecessary Symbolic type
This type is a special case of Function and doesn’t need to be represented separately.
This commit is contained in:
parent
25c567af06
commit
5e39fc5cec
@ -356,7 +356,6 @@ pub enum Term
|
|||||||
Integer(i32),
|
Integer(i32),
|
||||||
SpecialInteger(SpecialInteger),
|
SpecialInteger(SpecialInteger),
|
||||||
String(String),
|
String(String),
|
||||||
Symbolic(String),
|
|
||||||
UnaryOperation(UnaryOperation),
|
UnaryOperation(UnaryOperation),
|
||||||
Variable(Variable),
|
Variable(Variable),
|
||||||
}
|
}
|
||||||
@ -450,11 +449,6 @@ impl Term
|
|||||||
Self::special_integer(SpecialInteger::Supremum)
|
Self::special_integer(SpecialInteger::Supremum)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn symbolic(value: String) -> Self
|
|
||||||
{
|
|
||||||
Self::Symbolic(value)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn true_() -> Self
|
pub fn true_() -> Self
|
||||||
{
|
{
|
||||||
Self::boolean(true)
|
Self::boolean(true)
|
||||||
|
@ -44,7 +44,6 @@ impl Precedence for crate::Term
|
|||||||
| Self::Function(_)
|
| Self::Function(_)
|
||||||
| Self::SpecialInteger(_)
|
| Self::SpecialInteger(_)
|
||||||
| Self::Integer(_)
|
| Self::Integer(_)
|
||||||
| Self::Symbolic(_)
|
|
||||||
| Self::String(_)
|
| Self::String(_)
|
||||||
| Self::Variable(_)
|
| Self::Variable(_)
|
||||||
=> 0,
|
=> 0,
|
||||||
@ -127,7 +126,6 @@ impl<'term> std::fmt::Debug for TermDisplay<'term>
|
|||||||
crate::Term::SpecialInteger(crate::SpecialInteger::Infimum) => write!(format, "#inf"),
|
crate::Term::SpecialInteger(crate::SpecialInteger::Infimum) => write!(format, "#inf"),
|
||||||
crate::Term::SpecialInteger(crate::SpecialInteger::Supremum) => write!(format, "#sup"),
|
crate::Term::SpecialInteger(crate::SpecialInteger::Supremum) => write!(format, "#sup"),
|
||||||
crate::Term::Integer(value) => write!(format, "{}", value),
|
crate::Term::Integer(value) => write!(format, "{}", value),
|
||||||
crate::Term::Symbolic(value) => write!(format, "{}", value),
|
|
||||||
crate::Term::String(value) => write!(format, "\"{}\"", value),
|
crate::Term::String(value) => write!(format, "\"{}\"", value),
|
||||||
crate::Term::Variable(variable) => write!(format, "{:?}", variable.declaration),
|
crate::Term::Variable(variable) => write!(format, "{:?}", variable.declaration),
|
||||||
crate::Term::Function(function) =>
|
crate::Term::Function(function) =>
|
||||||
|
Loading…
Reference in New Issue
Block a user