From 881248d2c4f0b4556a23d671d355bb7258adf8bb Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Tue, 17 Dec 2019 14:33:06 +0000 Subject: Rename syntax::core to syntax::ast --- dhall/src/syntax/text/parser.rs | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'dhall/src/syntax/text/parser.rs') diff --git a/dhall/src/syntax/text/parser.rs b/dhall/src/syntax/text/parser.rs index f6b6577..617348b 100644 --- a/dhall/src/syntax/text/parser.rs +++ b/dhall/src/syntax/text/parser.rs @@ -7,13 +7,12 @@ use pest_consume::{match_nodes, Parser}; use crate::semantics::phase::Normalized; use crate::syntax; -use crate::syntax::core; use crate::syntax::map::{DupTreeMap, DupTreeSet}; use crate::syntax::ExprF::*; use crate::syntax::{ - FilePath, FilePrefix, Hash, ImportLocation, ImportMode, InterpolatedText, - InterpolatedTextContents, Label, NaiveDouble, RawExpr, Scheme, Span, URL, - V, + Double, FilePath, FilePrefix, Hash, ImportLocation, ImportMode, Integer, + InterpolatedText, InterpolatedTextContents, Label, NaiveDouble, Natural, + RawExpr, Scheme, Span, URL, V, }; // This file consumes the parse tree generated by pest and turns it into @@ -349,20 +348,20 @@ impl DhallParser { } #[alias(double_literal)] - fn NaN(_input: ParseInput) -> ParseResult { + fn NaN(_input: ParseInput) -> ParseResult { Ok(std::f64::NAN.into()) } #[alias(double_literal)] - fn minus_infinity_literal(_input: ParseInput) -> ParseResult { + fn minus_infinity_literal(_input: ParseInput) -> ParseResult { Ok(std::f64::NEG_INFINITY.into()) } #[alias(double_literal)] - fn plus_infinity_literal(_input: ParseInput) -> ParseResult { + fn plus_infinity_literal(_input: ParseInput) -> ParseResult { Ok(std::f64::INFINITY.into()) } #[alias(double_literal)] - fn numeric_double_literal(input: ParseInput) -> ParseResult { + fn numeric_double_literal(input: ParseInput) -> ParseResult { let s = input.as_str().trim(); match s.parse::() { Ok(x) if x.is_infinite() => Err(input.error(format!( @@ -374,7 +373,7 @@ impl DhallParser { } } - fn natural_literal(input: ParseInput) -> ParseResult { + fn natural_literal(input: ParseInput) -> ParseResult { input .as_str() .trim() @@ -382,7 +381,7 @@ impl DhallParser { .map_err(|e| input.error(format!("{}", e))) } - fn integer_literal(input: ParseInput) -> ParseResult { + fn integer_literal(input: ParseInput) -> ParseResult { input .as_str() .trim() -- cgit v1.2.3