Skip to content

Commit

Permalink
- do not print = twice in modifiers.
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@14524 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adrpo committed Dec 23, 2012
1 parent 3e011e8 commit e40736d
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions Compiler/FrontEnd/Mod.mo
Original file line number Diff line number Diff line change
Expand Up @@ -2738,24 +2738,21 @@ algorithm str := matchcontinue(inSubs,depth)
case({},_) then "";
case((s as DAE.NAMEMOD(id,(m as DAE.REDECL(finalPrefix=_))))::subs,_)
equation
//s1 = prettyPrintSubs(subs);
//s2 = prettyPrintMod(m,depth+1);
//s2 = Util.if_(stringLength(s2) == 0, ""," = " +& s2);
s2 = " redeclare(" +& id +& "), class or component " +& id;
then
s2;
case((s as DAE.NAMEMOD(id,m))::subs,_)
equation
s2 = prettyPrintMod(m,depth+1);
s2 = Util.if_(stringLength(s2) == 0, ""," = " +& s2);
s2 = Util.if_(stringLength(s2) == 0, "", s2);
s2 = "(" +& id +& s2 +& "), class or component " +& id;
then
s2;
case((s as DAE.IDXMOD(li,m))::subs,_)
equation
//s1 = prettyPrintSubs(subs);
s2 = prettyPrintMod(m,depth+1);
s1 = "["+& stringDelimitList(List.map(li,intString),",")+&"]" +& " = " +& s2;
s1 = "["+& stringDelimitList(List.map(li,intString),",")+&"]" +& s2;
then
s1;
end matchcontinue;
Expand Down Expand Up @@ -2787,15 +2784,15 @@ algorithm
case(DAE.NAMEMOD(id,m))
equation
s2 = prettyPrintMod(m,0);
s2 = Util.if_(stringLength(s2) == 0, ""," = " +& s2);
s2 = Util.if_(stringLength(s2) == 0, "", s2);
s2 = id +& s2;
then
s2;

case(DAE.IDXMOD(li,m))
equation
s2 = prettyPrintMod(m,0);
s1 = "["+& stringDelimitList(List.map(li,intString),",")+&"]" +& " = " +& s2;
s1 = "["+& stringDelimitList(List.map(li,intString),",")+&"]" +& s2;
then
s1;

Expand Down

0 comments on commit e40736d

Please sign in to comment.