From 8d45d633dfa60e8d64c9e6e742de4e33496bf0fa Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Tue, 13 Aug 2019 22:11:45 +0200 Subject: Store Imports in their own node instead of in Embed --- dhall_syntax/src/parser.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'dhall_syntax/src/parser.rs') 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; -pub(crate) type ParsedSubExpr = SubExpr; -type ParsedText = InterpolatedText>; -type ParsedTextContents = InterpolatedTextContents>; +pub(crate) type ParsedExpr = Expr; +pub(crate) type ParsedSubExpr = SubExpr; +type ParsedText = InterpolatedText; +type ParsedTextContents = InterpolatedTextContents; pub type ParseError = pest::error::Error; @@ -691,19 +691,19 @@ make_parser! { rule!(import 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 })) -- cgit v1.2.3