Skip to content

Commit

Permalink
Set algorithm configuration in event printers.
Browse files Browse the repository at this point in the history
  • Loading branch information
joaquinffernandez committed Nov 2, 2022
1 parent 6b324d0 commit 9199f6b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/mmoc/ir/event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@
#include <assert.h>
#include <sstream>

#include "../ast/expression.h"
#include "../util/util.h"
#include "../util/visitors/convert_condition.h"
#include "helpers.h"
#include <ast/expression.h>
#include <ir/helpers.h>
#include <util/model_config.h>
#include <util/util.h>
#include <util/visitors/convert_condition.h>

namespace MicroModelica {
using namespace Util;
Expand Down Expand Up @@ -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;
Expand All @@ -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();
}

Expand Down

0 comments on commit 9199f6b

Please sign in to comment.