eolian-cxx: Added grammar rule parameters_cxx_list.

Now with the correct semantics: list parameters converting to C++.
This commit is contained in:
Savio Sena 2014-07-24 16:00:10 -03:00
parent 425f220f92
commit bd68d29968
2 changed files with 11 additions and 1 deletions

View File

@ -111,7 +111,7 @@ operator<<(std::ostream& out, inheritance_wrappers const& x)
<< tab(1)
<< (!function_is_void(func) ? "return ": "")
<< "static_cast<T*>(self->this_)->"
<< func.name << "(" << parameters_c_list(func.params) << ");" << endl
<< func.name << "(" << parameters_cxx_list(func.params) << ");" << endl
<< "}" << endl << endl;
}
return out;

View File

@ -154,6 +154,16 @@ parameters_cxx_list
inline std::ostream&
operator<<(std::ostream& out, parameters_cxx_list const& x)
{
auto first = x._params.cbegin(), last = x._params.cend();
for (auto it = first; it != last; ++it)
{
if (it != first)
out << ", ";
out << to_cxx(it->type, it->name);
}
return out;
}
struct
constructor_parameters_list
{