#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
pub struct SourceSpan
{
pub start: usize,
pub end: usize,
}
impl SourceSpan
{
pub fn new(start: usize, end: usize) -> Self { Self { start, end } }
pub fn slice(self, source: &str) -> Option<&str> { source.get(self.start..self.end) }
pub fn cover(self, other: Self) -> Self
{ Self::new(self.start.min(other.start), self.end.max(other.end)) }
}