Skip to content

Commit

Permalink
- Tail-recursion
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@14102 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Nov 28, 2012
1 parent 143d435 commit 72a3d0b
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions Compiler/Template/Tpl.mo
Expand Up @@ -1255,8 +1255,7 @@ public function iterSeparatorString
output Integer outActualPositionOnLine;
output Boolean outAtStartOfLine;
algorithm
(outActualPositionOnLine, outAtStartOfLine)
:= matchcontinue (inTokens, inSeparator, inActualPositionOnLine, inAtStartOfLine, inAfterNewLineIndent)
(outActualPositionOnLine, outAtStartOfLine) := match (inTokens, inSeparator, inActualPositionOnLine, inAtStartOfLine, inAfterNewLineIndent)
local
Tokens toks;
StringToken tok, septok;
Expand All @@ -1275,13 +1274,7 @@ algorithm
= iterSeparatorString(toks, septok, pos, isstart, aind);
then
(pos, isstart);
//should not ever happen
case (_,_,_,_,_)
equation
Debug.fprint(Flags.FAILTRACE, "-!!!Tpl.iterSeparatorString failed.\n");
then
fail();
end matchcontinue;
end match;
end iterSeparatorString;


Expand Down

0 comments on commit 72a3d0b

Please sign in to comment.