From 4f98c23963e82eaf08c9d7291d0988d13571d337 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sun, 2 Feb 2020 17:36:15 +0000 Subject: Fix spans for unions and records --- dhall/src/syntax/ast/expr.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'dhall/src/syntax/ast/expr.rs') diff --git a/dhall/src/syntax/ast/expr.rs b/dhall/src/syntax/ast/expr.rs index 28a0aee..b493fdb 100644 --- a/dhall/src/syntax/ast/expr.rs +++ b/dhall/src/syntax/ast/expr.rs @@ -275,6 +275,12 @@ impl Expr { span: self.span.clone(), } } + pub fn with_span(self, span: Span) -> Self { + Expr { + kind: self.kind, + span, + } + } pub fn traverse_resolve_mut( &mut self, -- cgit v1.2.3