Skip to content

Commit

Permalink
- add Types for all DAE.Statement to ppStmtStr
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@14844 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Jens Frenkel committed Jan 21, 2013
1 parent 54c6d68 commit 8edd0b1
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions Compiler/FrontEnd/DAEDump.mo
Expand Up @@ -2071,6 +2071,7 @@ algorithm
list<DAE.Statement> then_,stmts;
DAE.Statement stmt;
Algorithm.Else else_;
DAE.ElementSource source;

case (DAE.STMT_ASSIGN(exp1 = e2,exp = e),i)
equation
Expand Down Expand Up @@ -2129,6 +2130,18 @@ algorithm
str = stringAppendList({s1,"for ",id,s2," in ",s3," loop\n",s4,s5,"end for;\n"});
then
str;

case (DAE.STMT_PARFOR(iter = id,index = index,range = e,statementLst = stmts),i)
equation
s1 = indentStr(i);
s2 = Util.if_(index == -1, "", "/* iter index " +& intString(index) +& " */");
s3 = ExpressionDump.printExpStr(e);
i_1 = i + 2;
s4 = ppStmtListStr(stmts, i_1);
s5 = indentStr(i);
str = stringAppendList({s1,"parfor ",id,s2," in ",s3," loop\n",s4,s5,"end for;\n"});
then
str;

case (DAE.STMT_WHILE(exp = e,statementLst = stmts),i)
equation
Expand Down Expand Up @@ -2208,6 +2221,33 @@ algorithm
str = stringAppendList({s1,"failure(\n",s2,s1,");\n"});
then str;

case (DAE.STMT_ARRAY_INIT(name=s2),i)
equation
s1 = indentStr(i);
str = stringAppendList({s1,"arrayInit(\n",s2,s1,");\n"});
then str;

case (DAE.STMT_TRY(tryBody=stmts),i)
equation
s1 = indentStr(i);
s2 = ppStmtListStr(stmts, i+2);
str = stringAppendList({s1,"try(\n",s2,s1,");\n"});
then str;

case (DAE.STMT_CATCH(catchBody=stmts),i)
equation
s1 = indentStr(i);
s2 = ppStmtListStr(stmts, i+2);
str = stringAppendList({s1,"catch(\n",s2,s1,");\n"});
then str;

case (DAE.STMT_THROW(source=source),i)
equation
s1 = indentStr(i);
s2 = getSourceInformationStr(source);
str = stringAppendList({s1,"throw(\n",s2,s1,");\n"});
then str;

case (_,i)
equation
s1 = indentStr(i);
Expand Down

0 comments on commit 8edd0b1

Please sign in to comment.