From 9199f6b10aaa187a556869ad11fdce2cafef2289 Mon Sep 17 00:00:00 2001 From: "joaquin.f.fernandez" Date: Wed, 2 Nov 2022 11:25:35 -0300 Subject: [PATCH] Set algorithm configuration in event printers. --- src/mmoc/ir/event.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/mmoc/ir/event.cpp b/src/mmoc/ir/event.cpp index 491bc45d..7930170d 100644 --- a/src/mmoc/ir/event.cpp +++ b/src/mmoc/ir/event.cpp @@ -22,10 +22,11 @@ #include #include -#include "../ast/expression.h" -#include "../util/util.h" -#include "../util/visitors/convert_condition.h" -#include "helpers.h" +#include +#include +#include +#include +#include namespace MicroModelica { using namespace Util; @@ -110,6 +111,7 @@ string Event::handler(EVENT::Type type) const if (stms.empty()) { return ""; }; + ModelConfig::instance().setAlgorithm(true); stringstream buffer; string block = ""; FunctionPrinter fp; @@ -128,6 +130,7 @@ string Event::handler(EVENT::Type type) const } buffer << block << fp.endDimGuards(_range); buffer << block << fp.endExpression(_range); + ModelConfig::instance().setAlgorithm(false); return buffer.str(); }