summaryrefslogtreecommitdiff
path: root/dhall/src/syntax/ast
diff options
context:
space:
mode:
authorNadrieril2020-02-02 17:36:15 +0000
committerNadrieril2020-02-02 17:36:15 +0000
commit4f98c23963e82eaf08c9d7291d0988d13571d337 (patch)
treef225a383f0236866b9ce1f25960b77ca295aabf4 /dhall/src/syntax/ast
parent47167b874179bd6e659f0a596defcfe854369618 (diff)
Fix spans for unions and records
Diffstat (limited to 'dhall/src/syntax/ast')
-rw-r--r--dhall/src/syntax/ast/expr.rs6
1 files changed, 6 insertions, 0 deletions
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<E> Expr<E> {
span: self.span.clone(),
}
}
+ pub fn with_span(self, span: Span) -> Self {
+ Expr {
+ kind: self.kind,
+ span,
+ }
+ }
pub fn traverse_resolve_mut<Err, F1>(
&mut self,