From aac8a2a06f557bda1893d891bf812c02b898d897 Mon Sep 17 00:00:00 2001 From: Greg Brown Date: Wed, 25 Nov 2020 20:08:40 +0000 Subject: Add let statements --- src/main.rs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index c180302..2e5532c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,15 +1,12 @@ use chomp::{ - ast::{ - convert::{Context, Convert}, - typed::{FlastContext, Type}, - }, - nibble::Expression, + ast::typed::{FlastContext, Type}, + nibble::File, }; use proc_macro2::Span; -use std::process::exit; use std::{ error::Error, io::{self, Read, Write}, + process::exit, }; use syn::Ident; @@ -19,9 +16,9 @@ fn main() { .read_to_string(&mut input) .map_err(|e| Box::new(e) as Box) .and_then(|_| syn::parse_str(&input).map_err(|e| Box::new(e) as Box)) - .and_then(|nibble: Expression| { + .and_then(|nibble: File| { nibble - .convert(&mut Context::new()) + .convert_with_substitution() .well_typed(&mut FlastContext::new()) .map_err(|e| Box::new(e) as Box) }) -- cgit v1.2.3