#[derive(Clone, Copy, Debug)]
pub struct Char {
pub c: char,
pub pos: Position,
}
impl Char {
pub fn is_whitespace(&self) -> bool {
self.c.is_whitespace()
}
}
impl PartialEq<char> for Char {
fn eq(&self, other: &char) -> bool {
self.c.eq(other)
}
}
#[derive(Clone, Copy, Debug, Default, Eq, Ord, PartialEq, PartialOrd)]
pub struct Position {
pub line: usize,
pub column: usize,
pub index: usize,
}