summaryrefslogtreecommitdiff
path: root/dhall_syntax/src/parser.rs
diff options
context:
space:
mode:
authorNadrieril2019-08-13 22:11:45 +0200
committerNadrieril2019-08-13 22:11:45 +0200
commit8d45d633dfa60e8d64c9e6e742de4e33496bf0fa (patch)
tree526c351bbdd6121cdde3cd56f721156d3b34e6de /dhall_syntax/src/parser.rs
parent07956ccb1daf4a6819f64776f70b6f5f26869184 (diff)
Store Imports in their own node instead of in Embed
Diffstat (limited to '')
-rw-r--r--dhall_syntax/src/parser.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/dhall_syntax/src/parser.rs b/dhall_syntax/src/parser.rs
index 1ab6e6d..a8dd359 100644
--- a/dhall_syntax/src/parser.rs
+++ b/dhall_syntax/src/parser.rs
@@ -15,10 +15,10 @@ use crate::*;
// their own crate because they are quite general and useful. For now they
// are here and hopefully you can figure out how they work.
-pub(crate) type ParsedExpr = Expr<Import>;
-pub(crate) type ParsedSubExpr = SubExpr<Import>;
-type ParsedText = InterpolatedText<SubExpr<Import>>;
-type ParsedTextContents = InterpolatedTextContents<SubExpr<Import>>;
+pub(crate) type ParsedExpr = Expr<Void>;
+pub(crate) type ParsedSubExpr = SubExpr<Void>;
+type ParsedText = InterpolatedText<ParsedSubExpr>;
+type ParsedTextContents = InterpolatedTextContents<ParsedSubExpr>;
pub type ParseError = pest::error::Error<Rule>;
@@ -691,19 +691,19 @@ make_parser! {
rule!(import<ParsedSubExpr> as expression; span; children!(
[import_hashed(location_hashed)] => {
- spanned(span, Embed(Import {
+ spanned(span, Import(crate::Import {
mode: ImportMode::Code,
location_hashed
}))
},
[import_hashed(location_hashed), Text(_)] => {
- spanned(span, Embed(Import {
+ spanned(span, Import(crate::Import {
mode: ImportMode::RawText,
location_hashed
}))
},
[import_hashed(location_hashed), Location(_)] => {
- spanned(span, Embed(Import {
+ spanned(span, Import(crate::Import {
mode: ImportMode::Location,
location_hashed
}))