Add desugar command and desugar programs

This commit is contained in:
Joscha 2022-11-21 09:32:07 +01:00
parent 6eee1ba930
commit 8b21acac9e
6 changed files with 106 additions and 12 deletions

View file

@ -24,6 +24,14 @@ 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 {