diff options
Diffstat (limited to 'compiler/src/span.rs')
| -rw-r--r-- | compiler/src/span.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/src/span.rs b/compiler/src/span.rs index 8686f4f..8b46b31 100644 --- a/compiler/src/span.rs +++ b/compiler/src/span.rs | |||
| @@ -38,6 +38,10 @@ impl<T> Spanned<T> { | |||
| 38 | Self { inner, span } | 38 | Self { inner, span } |
| 39 | } | 39 | } |
| 40 | 40 | ||
| 41 | pub fn into_parts(self) -> (T, Span) { | ||
| 42 | (self.inner, self.span) | ||
| 43 | } | ||
| 44 | |||
| 41 | pub fn map<U>(self, f: impl FnOnce(T) -> U) -> Spanned<U> { | 45 | pub fn map<U>(self, f: impl FnOnce(T) -> U) -> Spanned<U> { |
| 42 | let Self { inner, span } = self; | 46 | let Self { inner, span } = self; |
| 43 | Spanned { | 47 | Spanned { |
