#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct Span {
pub line: usize,
pub column: usize,
pub length: usize,
}
impl Default for Span {
fn default() -> Self {
Self {
line: 1,
column: 1,
length: 1,
}
}
}
impl Span {
pub fn line(mut self, line: usize) -> Self {
self.line = line;
self
}
pub fn column(mut self, column: usize) -> Self {
self.column = column;
self
}
pub fn length(mut self, length: usize) -> Self {
self.length = length;
self
}
}