Skip to content

Commit

Permalink
- Fix dumping of for iterators in DAEDump.
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@12884 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
perost committed Sep 12, 2012
1 parent 0c73355 commit 6aeac12
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion Compiler/FrontEnd/DAEDump.mo
Expand Up @@ -1663,11 +1663,12 @@ algorithm
then
();

case (DAE.STMT_FOR(iter = id,range = e,statementLst = stmts),i)
case (DAE.STMT_FOR(iter = id,index = index,range = e,statementLst = stmts),i)
equation
indent(i);
Print.printBuf("for ");
Print.printBuf(id);
Debug.bcall(index <> -1, Print.printBuf, " /* iter index " +& intString(index) +& " */");
Print.printBuf(" in ");
ExpressionDump.printExp(e);
Print.printBuf(" loop\n");
Expand Down Expand Up @@ -3707,4 +3708,16 @@ algorithm
outStream := List.fold(l, dumpAlgorithmStream, outStream);
end dumpFunctionElementsStream;

public function unparseVarKind
input DAE.VarKind inVarKind;
output String outString;
algorithm
outString := match(inVarKind)
case DAE.VARIABLE() then "";
case DAE.PARAM() then "parameter";
case DAE.CONST() then "const";
case DAE.DISCRETE() then "discrete";
end match;
end unparseVarKind;

end DAEDump;

0 comments on commit 6aeac12

Please sign in to comment.