summaryrefslogtreecommitdiff
path: root/dhall/src/syntax/text
diff options
context:
space:
mode:
authorNadrieril2019-12-17 14:33:06 +0000
committerNadrieril2019-12-19 21:34:07 +0000
commit881248d2c4f0b4556a23d671d355bb7258adf8bb (patch)
tree0b70a90b646406d911348124e232d33e9daf5705 /dhall/src/syntax/text
parentf54d49e38b15c30a8b2cef8d85a8f69b1edbf3c5 (diff)
Rename syntax::core to syntax::ast
Diffstat (limited to 'dhall/src/syntax/text')
-rw-r--r--dhall/src/syntax/text/parser.rs19
-rw-r--r--dhall/src/syntax/text/printer.rs2
2 files changed, 10 insertions, 11 deletions
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<core::Double> {
+ fn NaN(_input: ParseInput) -> ParseResult<Double> {
Ok(std::f64::NAN.into())
}
#[alias(double_literal)]
- fn minus_infinity_literal(_input: ParseInput) -> ParseResult<core::Double> {
+ fn minus_infinity_literal(_input: ParseInput) -> ParseResult<Double> {
Ok(std::f64::NEG_INFINITY.into())
}
#[alias(double_literal)]
- fn plus_infinity_literal(_input: ParseInput) -> ParseResult<core::Double> {
+ fn plus_infinity_literal(_input: ParseInput) -> ParseResult<Double> {
Ok(std::f64::INFINITY.into())
}
#[alias(double_literal)]
- fn numeric_double_literal(input: ParseInput) -> ParseResult<core::Double> {
+ fn numeric_double_literal(input: ParseInput) -> ParseResult<Double> {
let s = input.as_str().trim();
match s.parse::<f64>() {
Ok(x) if x.is_infinite() => Err(input.error(format!(
@@ -374,7 +373,7 @@ impl DhallParser {
}
}
- fn natural_literal(input: ParseInput) -> ParseResult<core::Natural> {
+ fn natural_literal(input: ParseInput) -> ParseResult<Natural> {
input
.as_str()
.trim()
@@ -382,7 +381,7 @@ impl DhallParser {
.map_err(|e| input.error(format!("{}", e)))
}
- fn integer_literal(input: ParseInput) -> ParseResult<core::Integer> {
+ fn integer_literal(input: ParseInput) -> ParseResult<Integer> {
input
.as_str()
.trim()
diff --git a/dhall/src/syntax/text/printer.rs b/dhall/src/syntax/text/printer.rs
index 8df456b..7ccc708 100644
--- a/dhall/src/syntax/text/printer.rs
+++ b/dhall/src/syntax/text/printer.rs
@@ -112,7 +112,7 @@ impl<SE: Display + Clone, E: Display> Display for ExprF<SE, E> {
enum PrintPhase {
Base,
Operator,
- BinOp(core::BinOp),
+ BinOp(ast::BinOp),
App,
Import,
Primitive,