From: Maxime van Noppen <yabo(a)lrde.epita.fr>
To: transformers-patches(a)lrde.epita.fr, olena-patches(a)lrde.epita.fr
Subject: scool r133: Fix a bug in function and method translations
URL:
https://svn.lrde.epita.fr/svn/scool/branches/scool-ng
ChangeLog:
2009-02-11 Maxime van Noppen <yabo(a)lrde.epita.fr>
Fix a bug in function and method translations.
* scoolt/Class.str: Do not delete the dynamic rule just after its
creation.
* scoolt/Function.str: Handle verbatim C++ statements inside
functions.
---
Class.str | 2 +-
Function.str | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
Index: branches/scool-ng/src/scoolt/Class.str
===================================================================
--- branches/scool-ng/src/scoolt/Class.str (revision 132)
+++ branches/scool-ng/src/scoolt/Class.str (revision 133)
@@ -131,4 +131,4 @@
InClass = rules(IsInClass:- _) ; rules(IsInClass: _ -> 1)
- OutClass = rules(IsInClass: _ -> 0) ; rules(IsInClass:- _)
+ OutClass = rules(IsInClass:- _) ; rules(IsInClass: _ -> 0)
Index: branches/scool-ng/src/scoolt/Function.str
===================================================================
--- branches/scool-ng/src/scoolt/Function.str (revision 132)
+++ branches/scool-ng/src/scoolt/Function.str (revision 133)
@@ -106,6 +106,11 @@
<ExpressionToCxx> exp => cxx_exp
FunctionStatementToCxx:
+ CxxStatement(exp) -> cxx_exp
+ where
+ <ExpressionToCxx> exp => cxx_exp
+
+ FunctionStatementToCxx:
exp -> [CxxExpStm(CxxKeyword("return", cxx_exp))]
where
<ExpressionToCxx> exp => cxx_exp