From 980e50f33a88559edcf8b12cdec91fd9bee84ca9 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Fri, 20 Dec 2019 19:01:07 +0000 Subject: s/RawExpr/UnspannedExpr/ --- dhall/src/syntax/text/parser.rs | 10 +++++++--- dhall/src/syntax/text/printer.rs | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'dhall/src/syntax/text') diff --git a/dhall/src/syntax/text/parser.rs b/dhall/src/syntax/text/parser.rs index e1bb469..90cb4b1 100644 --- a/dhall/src/syntax/text/parser.rs +++ b/dhall/src/syntax/text/parser.rs @@ -12,7 +12,7 @@ use crate::syntax::ExprKind::*; use crate::syntax::{ Double, FilePath, FilePrefix, Hash, ImportLocation, ImportMode, Integer, InterpolatedText, InterpolatedTextContents, Label, NaiveDouble, Natural, - RawExpr, Scheme, Span, URL, V, + Scheme, Span, UnspannedExpr, URL, V, }; // This file consumes the parse tree generated by pest and turns it into @@ -76,10 +76,14 @@ impl crate::syntax::Builtin { fn input_to_span(input: ParseInput) -> Span { Span::make(input.user_data().clone(), input.as_pair().as_span()) } -fn spanned(input: ParseInput, x: RawExpr) -> Expr { +fn spanned(input: ParseInput, x: UnspannedExpr) -> Expr { Expr::new(x, input_to_span(input)) } -fn spanned_union(span1: Span, span2: Span, x: RawExpr) -> Expr { +fn spanned_union( + span1: Span, + span2: Span, + x: UnspannedExpr, +) -> Expr { Expr::new(x, span1.union(&span2)) } diff --git a/dhall/src/syntax/text/printer.rs b/dhall/src/syntax/text/printer.rs index ccd5206..7b781ea 100644 --- a/dhall/src/syntax/text/printer.rs +++ b/dhall/src/syntax/text/printer.rs @@ -27,7 +27,7 @@ impl<'a, E: Display + Clone> PhasedExpr<'a, E> { } } -impl RawExpr { +impl UnspannedExpr { // Annotate subexpressions with the appropriate phase, defaulting to Base fn annotate_with_phases<'a>(&'a self) -> ExprKind, E> { use crate::syntax::ExprKind::*; -- cgit v1.2.3