Create new objects with existing span

I've decided that attempting to create smaller spans is more difficult
and will also lead to worse error messages later on. It makes more sense
to just tag every newly created syntax tree element with the span of the
element it comes from.
This commit is contained in:
Joscha 2022-11-21 13:33:40 +01:00
parent 5c8dd1969f
commit b84d5ae0c8
3 changed files with 19 additions and 32 deletions

View file

@ -24,14 +24,6 @@ impl Span {
let end = self.end.max(other.end);
Self::new(start, end)
}
pub fn at_start(self) -> Self {
Self::new(self.start, self.start)
}
pub fn at_end(self) -> Self {
Self::new(self.end, self.end)
}
}
impl fmt::Debug for Span {