URL:
https://svn.lrde.epita.fr/svn/scool/branches/scool-ng
ChangeLog:
2008-10-06 Maxime van Noppen <yabo(a)lrde.epita.fr>
Fix bug in r107 (not translating scool AST in some cases)
* Class.str: Translate the StaticFunctionCall into C++.
Class.str | 8 +++++---
Expression.str | 1 +
2 files changed, 6 insertions(+), 3 deletions(-)
Index: branches/scool-ng/src/scoolt/Expression.str
===================================================================
--- branches/scool-ng/src/scoolt/Expression.str (revision 108)
+++ branches/scool-ng/src/scoolt/Expression.str (revision 109)
@@ -8,6 +8,7 @@
Identifier(idf) -> CxxId(idf)
+
BaseExpressionToCxx:
idf -> cxx_idf
where
Index: branches/scool-ng/src/scoolt/Class.str
===================================================================
--- branches/scool-ng/src/scoolt/Class.str (revision 108)
+++ branches/scool-ng/src/scoolt/Class.str (revision 109)
@@ -1,6 +1,6 @@
module Class
-imports libstratego-lib Cxx Scool Declaration
+imports libstratego-lib Cxx Scool Declaration Expression
rules
@@ -50,14 +50,16 @@
<?Some("abstract") <+ ?None()> cqualif
AddExactParameter(| cqualif, cxx_idf):
- SimpleType(type) -> StaticFunctionCall(Identifier(type), Parameters([params]))
+ SimpleType(type) -> cxx_class
where
<ExactParameter(| cqualif, cxx_idf)> [] => params
+ ; <StaticExpressionToCxx> StaticFunctionCall(Identifier(type),
Parameters([params])) => cxx_class
AddExactParameter(| cqualif, cxx_idf):
- StaticFunctionCall(idf, Parameters(params)) -> StaticFunctionCall(idf,
Parameters(new_params))
+ StaticFunctionCall(idf, Parameters(params)) -> cxx_class
where
<conc> ([<ExactParameter(| cqualif, cxx_idf)> []], params) =>
new_params
+ ; <StaticExpressionToCxx> StaticFunctionCall(idf, Parameters(new_params)) =>
cxx_class
ExactParameter(| cqualif, cxx_idf):
_ -> Identifier(idf)
--
\__/ \__/
(00) Maxime `yabo` van Noppen (00)
___) \ Epita 2009 / (___
(_____/ \_____)