From abda8d00117072f7c03f57eaeca9cf44427078dc Mon Sep 17 00:00:00 2001 From: Tolmachev Igor Date: Mon, 11 May 2026 08:34:22 +0300 Subject: Replace generic list AST with typed expression tree Each form (fn, let, for, set, do, call) now has its own variant with named fields instead of being a plain list. --- compiler/src/span.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'compiler/src/span.rs') 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 Spanned { Self { inner, span } } + pub fn into_parts(self) -> (T, Span) { + (self.inner, self.span) + } + pub fn map(self, f: impl FnOnce(T) -> U) -> Spanned { let Self { inner, span } = self; Spanned { -- cgit v1.3