Skip to content

Commit

Permalink
Configure statement reinits.
Browse files Browse the repository at this point in the history
  • Loading branch information
joaquinffernandez committed Nov 2, 2022
1 parent 9199f6b commit 7c69eee
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/mmoc/ir/statement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,12 @@ string Statement::printAssignment(AST_Statement_Assign asg) const
Expression lhs(asg->lhs());
Expression rhs(asg->exp());
bool state_assignment = checkStateAssignment(lhs);
bool initial_code = ModelConfig::instance().initialCode();
if (state_assignment) {
ModelConfig::instance().setInitialCode(true);
ModelConfig::instance().setReinit(true);
}
code << lhs << " = " << rhs << ";";
if (state_assignment) {
ModelConfig::instance().setInitialCode(initial_code);
ModelConfig::instance().setReinit(false);
}
break;
}
Expand Down

0 comments on commit 7c69eee

Please sign in to comment.