diff --git a/src/format/formulas.rs b/src/format/formulas.rs index a6f0965..c8f1210 100644 --- a/src/format/formulas.rs +++ b/src/format/formulas.rs @@ -1,34 +1,5 @@ use super::*; -impl super::Precedence for crate::Formula -{ - fn precedence_level(&self) -> i32 - { - match &self - { - Self::Predicate(_) - | Self::Boolean(_) - | Self::Compare(_) - => 0, - /*Self::And(formulas) - | Self::Or(formulas) if formulas.len() == 1 - => 0,*/ - Self::Not(_) - | Self::Exists(_) - | Self::ForAll(_) - => 1, - Self::And(_) - => 2, - Self::Or(_) - => 3, - Self::Implies(_) - => 4, - Self::IfAndOnlyIf(_) - => 5, - } - } -} - fn requires_parentheses<'formula>(formula: &'formula crate::Formula, parent_formula: &'formula crate::Formula) -> bool @@ -148,7 +119,6 @@ impl<'formula> std::fmt::Debug for FormulaDisplay<'formula> { fn fmt(&self, format: &mut std::fmt::Formatter) -> std::fmt::Result { - let precedence_level = self.formula.precedence_level(); let requires_parentheses = match self.parent_formula { Some(ref parent_formula) => requires_parentheses(self.formula, parent_formula),