Initial FnDef parsing.

This commit is contained in:
2026-11-15 12:32:51 +01:00
parent 592e476f29
commit ef1a527ef8
2 changed files with 145 additions and 15 deletions
+5 -1
View File
@@ -20,6 +20,10 @@ impl Span {
pub fn len(&self) -> usize {
self.end - self.start
}
pub fn extend(&self, other: &Span) -> Span {
Span::new(self.start, other.end)
}
}
impl Default for Span {
@@ -48,6 +52,6 @@ impl<T> Spanned<T> {
}
pub fn span_to(&self, other: &Spanned<T>) -> Span {
Span::new(self.span.start(), other.span.end())
self.span.extend(&other.span)
}
}