feat: add removal of discard lets

chore: Name change for AirTree sequence
feat: finish up assignment  constructor and list for airtree builder
This commit is contained in:
microproofs
2023-06-28 23:10:10 -04:00
committed by Kasey
parent 59362e3d8c
commit cd726b561e
3 changed files with 146 additions and 33 deletions

View File

@@ -13,7 +13,7 @@ use super::air::Air;
pub enum AirTree {
Statement(AirStatement),
Expression(AirExpression),
IncompleteSequence(Vec<AirTree>),
UnhoistedSequence(Vec<AirTree>),
}
#[derive(Debug, Clone, PartialEq)]
@@ -665,7 +665,7 @@ impl AirTree {
AirTree::Expression(_) => {
unreachable!("Trying to hoist an expression onto an expression.")
}
AirTree::IncompleteSequence(seq) => {
AirTree::UnhoistedSequence(seq) => {
let mut final_exp = next_exp;
while let Some(assign) = seq.pop() {
final_exp = Self::hoist_over(assign, final_exp);
@@ -679,7 +679,7 @@ impl AirTree {
match tree {
AirTree::Statement(_) => todo!(),
AirTree::Expression(_) => todo!(),
AirTree::IncompleteSequence(_) => todo!(),
AirTree::UnhoistedSequence(_) => todo!(),
}
}
}