From d3f4a32d1e3d39c8d42306e5ca5ad4bb256edcd8 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Fri, 8 Mar 2019 22:46:39 +0100 Subject: Rename Expr back to its true name --- dhall_generator/src/lib.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'dhall_generator/src') diff --git a/dhall_generator/src/lib.rs b/dhall_generator/src/lib.rs index d84bea4..75912d0 100644 --- a/dhall_generator/src/lib.rs +++ b/dhall_generator/src/lib.rs @@ -8,7 +8,7 @@ use quote::quote; #[proc_macro] pub fn dhall(input: proc_macro::TokenStream) -> proc_macro::TokenStream { let input_str = input.to_string(); - let expr: Box> = parser::parse_expr(&input_str).unwrap(); + let expr: Box> = parser::parse_expr(&input_str).unwrap(); let no_import = |_: &Import| -> X { panic!("Don't use import in dhall!()") }; let expr = expr.take_ownership_of_labels().map_embed(&no_import); @@ -19,10 +19,10 @@ pub fn dhall(input: proc_macro::TokenStream) -> proc_macro::TokenStream { // Returns an expression of type Expr<_, _>. Expects input variables // to be of type Box> (future-proof for structural sharing). fn dhall_to_tokenstream( - expr: &Expr_, + expr: &Expr, ctx: &Context, ) -> TokenStream { - use dhall_core::Expr_::*; + use dhall_core::Expr::*; match expr { e @ Var(_) => { let v = dhall_to_tokenstream_bx(e, ctx); @@ -75,10 +75,10 @@ fn dhall_to_tokenstream( // Returns an expression of type Box> fn dhall_to_tokenstream_bx( - expr: &Expr_, + expr: &Expr, ctx: &Context, ) -> TokenStream { - use dhall_core::Expr_::*; + use dhall_core::Expr::*; match expr { Var(V(s, n)) => { match ctx.lookup(&s, *n) { @@ -93,7 +93,7 @@ fn dhall_to_tokenstream_bx( // TODO: insert appropriate shifts ? let v: TokenStream = s.parse().unwrap(); quote! { { - let x: Box> = #v.clone(); + let x: Box> = #v.clone(); x } } } -- cgit v1.2.3