diff --git a/tamer/src/asg/air.rs b/tamer/src/asg/air.rs index 4ef932ce..e70459a6 100644 --- a/tamer/src/asg/air.rs +++ b/tamer/src/asg/air.rs @@ -111,12 +111,12 @@ impl Display for AirToken { /// all state is stored on the ASG itself, /// which is the parsing context. #[derive(Debug, PartialEq, Eq, Default)] -pub enum AirState { +pub enum AirAggregate { #[default] Empty, } -impl ParseState for AirState { +impl ParseState for AirAggregate { type Token = AirToken; type Object = (); type Error = AsgError; @@ -131,7 +131,7 @@ impl ParseState for AirState { tok: Self::Token, asg: &mut Self::Context, ) -> crate::parse::TransitionResult { - use AirState::*; + use AirAggregate::*; use AirToken::*; match (self, tok) { @@ -167,9 +167,9 @@ impl ParseState for AirState { } } -impl Display for AirState { +impl Display for AirAggregate { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - use AirState::*; + use AirAggregate::*; // This is not terribly useful beyond indicating which parser caused // an error. @@ -192,7 +192,7 @@ mod test { use super::*; - type Sut = AirState; + type Sut = AirAggregate; #[test] fn ident_decl() { diff --git a/tamer/src/ld/poc.rs b/tamer/src/ld/poc.rs index 444d9ef7..a7adf828 100644 --- a/tamer/src/ld/poc.rs +++ b/tamer/src/ld/poc.rs @@ -27,7 +27,7 @@ use super::xmle::{ }; use crate::{ asg::{ - air::{AirState, AirToken}, + air::{AirAggregate, AirToken}, Asg, AsgError, DefaultAsg, Ident, Object, }, diagnose::{AnnotatedSpan, Diagnostic}, @@ -190,11 +190,12 @@ fn load_xmlo<'a, P: AsRef, S: Escaper>( // TODO: This entire block is a WIP and will be incrementally // abstracted away. - let (mut asg, mut state) = - Lower::, flat::State<64>>::lower::< - _, - TameldError, - >(&mut XmlXirReader::new(file, escaper, ctx), |toks| { + let (mut asg, mut state) = Lower::< + ParsedObject, + flat::State<64>, + >::lower::<_, TameldError>( + &mut XmlXirReader::new(file, escaper, ctx), + |toks| { Lower::, XmloReader>::lower(toks, |xmlo| { let mut iter = xmlo.scan(false, |st, rtok| match st { true => None, @@ -212,7 +213,7 @@ fn load_xmlo<'a, P: AsRef, S: Escaper>( state, |air| { let (_, asg) = - Lower::::lower_with_context( + Lower::::lower_with_context( air, asg, |end| { @@ -227,7 +228,8 @@ fn load_xmlo<'a, P: AsRef, S: Escaper>( }, ) }) - })?; + }, + )?; let mut dir: PathBuf = path.clone(); dir.pop();