From 5e39fc5cec9537d8f536beb8a0c8355bf3d7c350 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Sun, 2 Feb 2020 19:31:16 +0100 Subject: [PATCH] Remove unnecessary Symbolic type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This type is a special case of Function and doesn’t need to be represented separately. --- src/ast.rs | 6 ------ src/format.rs | 2 -- 2 files changed, 8 deletions(-) diff --git a/src/ast.rs b/src/ast.rs index 23178c6..1a3c82a 100644 --- a/src/ast.rs +++ b/src/ast.rs @@ -356,7 +356,6 @@ pub enum Term Integer(i32), SpecialInteger(SpecialInteger), String(String), - Symbolic(String), UnaryOperation(UnaryOperation), Variable(Variable), } @@ -450,11 +449,6 @@ impl Term Self::special_integer(SpecialInteger::Supremum) } - pub fn symbolic(value: String) -> Self - { - Self::Symbolic(value) - } - pub fn true_() -> Self { Self::boolean(true) diff --git a/src/format.rs b/src/format.rs index 15daba8..2ebfba3 100644 --- a/src/format.rs +++ b/src/format.rs @@ -44,7 +44,6 @@ impl Precedence for crate::Term | Self::Function(_) | Self::SpecialInteger(_) | Self::Integer(_) - | Self::Symbolic(_) | Self::String(_) | Self::Variable(_) => 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::Supremum) => write!(format, "#sup"), crate::Term::Integer(value) => write!(format, "{}", value), - crate::Term::Symbolic(value) => write!(format, "{}", value), crate::Term::String(value) => write!(format, "\"{}\"", value), crate::Term::Variable(variable) => write!(format, "{:?}", variable.declaration), crate::Term::Function(function) =>