summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorGreg Brown <gmb60@cam.ac.uk>2020-11-25 20:08:40 +0000
committerGreg Brown <gmb60@cam.ac.uk>2020-11-25 20:08:40 +0000
commitaac8a2a06f557bda1893d891bf812c02b898d897 (patch)
tree0ac6fe7d3be8fbc5c36486196f045c44dcbdf8b9 /src/main.rs
parente2cd078cb16834256439ac775cb8cf1e17679181 (diff)
Add let statements
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs13
1 files changed, 5 insertions, 8 deletions
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<dyn Error>)
.and_then(|_| syn::parse_str(&input).map_err(|e| Box::new(e) as Box<dyn Error>))
- .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<dyn Error>)
})