Skip to content

Commit

Permalink
-fix in cpp template for algortihm no retcall
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@12419 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
niklwors committed Aug 3, 2012
1 parent acb3222 commit 0a66154
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion Compiler/Template/CodegenCpp.tpl
Expand Up @@ -6640,7 +6640,7 @@ template algStatement(DAE.Statement stmt, Context context, Text &varDecls,SimCod
case s as STMT_CATCH(__) then "STMT CATCH"
case s as STMT_THROW(__) then "STMT THROW"
case s as STMT_RETURN(__) then "STMT RETURN"
case s as STMT_NORETCALL(__) then "STMT NORETCALL"
case s as STMT_NORETCALL(__) then algStmtNoretcall(s, context, &varDecls /*BUFD*/,simCode)
case s as STMT_REINIT(__) then algStmtReinit(s, context, &varDecls /*BUFD*/,simCode)
else error(sourceInfo(), 'ALG_STATEMENT NYI')
<<
Expand Down Expand Up @@ -6968,6 +6968,20 @@ template algStmtForGeneric_impl(Exp exp, Ident iterator, String type,

end algStmtForGeneric_impl;

template algStmtNoretcall(DAE.Statement stmt, Context context, Text &varDecls /*BUFP*/,SimCode simCode)
"Generates a no return call algorithm statement."
::=
match stmt
case STMT_NORETCALL(__) then
let &preExp = buffer "" /*BUFD*/
let expPart = daeExp(exp, context, &preExp /*BUFC*/, &varDecls /*BUFD*/,simCode)
<<
//No retcall
<%preExp%>
<%expPart%>;
>>
end algStmtNoretcall;

template algStmtForRange(DAE.Statement stmt, Context context, Text &varDecls /*BUFP*/,SimCode simCode)
"Generates a for algorithm statement where range is RANGE."
::=
Expand Down

0 comments on commit 0a66154

Please sign in to comment.