Skip to content

Commit

Permalink
[NB] Print equation attributes for any equation (#12438)
Browse files Browse the repository at this point in the history
  • Loading branch information
phannebohm committed May 17, 2024
1 parent 58f675a commit 0c6cfc3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions OMCompiler/Compiler/NBackEnd/Classes/NBEquation.mo
Original file line number Diff line number Diff line change
Expand Up @@ -699,9 +699,9 @@ public
tupl_recd_str := if Type.isTuple(eq.ty) then "[TUPL] " else "[RECD] ";
then str + tupl_recd_str + s + " " + Expression.toString(eq.lhs) + " = " + Expression.toString(eq.rhs) + EquationAttributes.toString(eq.attr, " ");
case ALGORITHM() then str + "[ALGO] " + s + EquationAttributes.toString(eq.attr, " ") + "\n" + Algorithm.toString(eq.alg, str + "[----] ");
case IF_EQUATION() then str + IfEquationBody.toString(eq.body, str + "[----] ", "[-IF-] " + s);
case IF_EQUATION() then str + IfEquationBody.toString(eq.body, str + "[----] ", "[-IF-] " + s + EquationAttributes.toString(eq.attr, " "));
case FOR_EQUATION() then str + forEquationToString(eq.iter, eq.body, "", str + "[----] ", "[FOR-] " + s + EquationAttributes.toString(eq.attr, " "));
case WHEN_EQUATION() then str + WhenEquationBody.toString(eq.body, str + "[----] ", "[WHEN] " + s);
case WHEN_EQUATION() then str + WhenEquationBody.toString(eq.body, str + "[----] ", "[WHEN] " + s + EquationAttributes.toString(eq.attr, " ") + "\n[----] ");
case AUX_EQUATION() then str + "[AUX-] " + s + "Auxiliary equation for " + Variable.toString(Pointer.access(eq.auxiliary));
case DUMMY_EQUATION() then str + "[DUMY] (0) Dummy equation.";
else str + "[FAIL] (0) " + getInstanceName() + " failed!";
Expand Down

0 comments on commit 0c6cfc3

Please sign in to comment.