use super::*;
use std::fmt::{Display, Formatter};
#[derive(Copy, Clone, Debug, PartialEq, Eq, Ord, PartialOrd)]
pub enum WolframRule {
Rule,
RuleDelayed,
}
impl Display for WolframRule {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
match self {
Self::Rule => write!(f, "->"),
Self::RuleDelayed => write!(f, ":>"),
}
}
}
#[derive(Debug, Clone, PartialEq, Eq, Ord, PartialOrd)]
pub struct WolframPair {
rule: WolframRule,
key: WolframValue,
value: WolframValue,
}