use crate::expression_tree::node::negation::Negation;
use super::node::operator::Operator;
pub enum Shell{
Operator(Negation, Operator),
Variable(Negation, String),
Constant(Negation, bool),
Parentheses,
Tilde(Negation),
}
impl Shell{
pub fn is_operator(&self) -> bool{
match self{
Self::Operator(..) => true,
_ => false,
}
}
pub fn is_variable(&self) -> bool{
match self{
Self::Variable(..) => true,
_ => false,
}
}
pub fn is_constant(&self) -> bool{
match self{
Self::Constant(..) => true,
_ => false,
}
}
pub fn is_parentheses(&self) -> bool{
match self{
Self::Parentheses => true,
_ => false,
}
}
pub fn is_tilde(&self) -> bool{
match self{
Self::Tilde(..) => true,
_ => false,
}
}
}