Desugar from the outside in

This commit is contained in:
Joscha 2022-11-21 14:35:10 +01:00
parent ebc48fff5a
commit 290cef06cb
5 changed files with 62 additions and 165 deletions

View file

@ -37,6 +37,17 @@ impl Space {
span,
}
}
pub fn then(mut self, other: Self) -> Self {
self.lines.extend(other.lines);
self.span = self.span.join(other.span);
self
}
pub fn then_line(mut self, line: Line) -> Self {
self.lines.push(line);
self
}
}
#[derive(Clone)]