use std::fmt::{Display, Error, Formatter};
use crate::instruction::{Move, State};
use crate::Symbol;
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct Tail<S: Symbol> {
pub state: State,
pub symbol: S,
pub movement: Move,
}
impl<S: Symbol> Tail<S> {
#[rustfmt::skip]
pub fn new(state: State, symbol: S, movement: Move) -> Self {
Tail { state, symbol, movement }
}
}
impl<S: Symbol> Display for Tail<S> {
fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error> {
write!(f, "{}, {}, {}", self.state, self.symbol, self.movement)
}
}