diff options
author | Nadrieril | 2019-12-20 19:01:07 +0000 |
---|---|---|
committer | Nadrieril | 2019-12-20 19:01:07 +0000 |
commit | 980e50f33a88559edcf8b12cdec91fd9bee84ca9 (patch) | |
tree | f0d5dde2a58e354ad284bd102ca7adf03a941996 /dhall/src/syntax/text | |
parent | 3999e40e06b6282c10cd57c962b6316c374fc041 (diff) |
s/RawExpr/UnspannedExpr/
Diffstat (limited to 'dhall/src/syntax/text')
-rw-r--r-- | dhall/src/syntax/text/parser.rs | 10 | ||||
-rw-r--r-- | dhall/src/syntax/text/printer.rs | 2 |
2 files changed, 8 insertions, 4 deletions
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<Normalized>) -> Expr { +fn spanned(input: ParseInput, x: UnspannedExpr<Normalized>) -> Expr { Expr::new(x, input_to_span(input)) } -fn spanned_union(span1: Span, span2: Span, x: RawExpr<Normalized>) -> Expr { +fn spanned_union( + span1: Span, + span2: Span, + x: UnspannedExpr<Normalized>, +) -> 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<E: Display + Clone> RawExpr<E> { +impl<E: Display + Clone> UnspannedExpr<E> { // Annotate subexpressions with the appropriate phase, defaulting to Base fn annotate_with_phases<'a>(&'a self) -> ExprKind<PhasedExpr<'a, E>, E> { use crate::syntax::ExprKind::*; |