Add a validation step back.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use crate::syntax::ast::{Program, Statement, Expression};
|
||||
use crate::syntax::ast::{Expression, Program, Statement};
|
||||
|
||||
impl Program {
|
||||
pub fn simplify(mut self) -> Self {
|
||||
@@ -40,10 +40,14 @@ impl Expression {
|
||||
|
||||
let new_name = format!("<{}:{}>", base_name, *gensym_index);
|
||||
*gensym_index += 1;
|
||||
prereqs.push(Statement::Binding(loc.clone(), new_name.clone(), Expression::Primitive(loc.clone(), prim, new_exprs)));
|
||||
prereqs.push(Statement::Binding(
|
||||
loc.clone(),
|
||||
new_name.clone(),
|
||||
Expression::Primitive(loc.clone(), prim, new_exprs),
|
||||
));
|
||||
|
||||
(prereqs, Expression::Reference(loc, new_name))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user