1
0
Fork 0
mirror of synced 2025-09-24 04:40:05 +00:00

teaks following review

This commit is contained in:
schaeff 2017-12-19 00:01:59 +01:00
parent 38bdb941a1
commit 4f1404e682
2 changed files with 6 additions and 4 deletions

View file

@ -424,7 +424,7 @@ impl Flattener {
match param_expr.apply_substitution(&self.substitution) {
Expression::Identifier(ref x) => params_flattened.push(Parameter {
id: x.clone().to_string(),
private: false
private: true
}),
_ => {
let expr_subbed = param_expr.apply_substitution(&self.substitution);
@ -440,7 +440,7 @@ impl Flattener {
.push(Statement::Definition(intermediate_var.clone(), rhs));
params_flattened.push(Parameter {
id: intermediate_var.clone().to_string(),
private: false
private: true
});
}
}

View file

@ -1,4 +1,6 @@
//! Module containing semantic analysis tools to run at compile time
//! The goal is to detect semantic errors such as undefined variables
//! A variable is undefined if it isn't present in the static scope
//!
//! @file semantics.rs
//! @author Thibaut Schaeffer <thibaut@schaeff.fr>
@ -116,9 +118,9 @@ impl Checker {
self.check_expression(e2)?;
Ok(())
}
Expression::IfElse(box condition, box consequent, box alternative) => {
Expression::IfElse(box condition, box consequence, box alternative) => {
self.check_condition(condition)?;
self.check_expression(consequent)?;
self.check_expression(consequence)?;
self.check_expression(alternative)?;
Ok(())
}