diff options
author | John Hodge <tpg@mutabah.net> | 2016-01-30 15:41:15 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-01-30 15:41:15 +0800 |
commit | e3cf598517bf45317df0891462d71fa0b20dd1b9 (patch) | |
tree | 9c359e49507faa9c36e0c3ebb6612a8c26271a0a /src/convert/render.cpp | |
parent | bc4c6189980d2fc1c8e753b9cd614699652ecba7 (diff) | |
download | mrust-e3cf598517bf45317df0891462d71fa0b20dd1b9.tar.gz |
A whole lot of messing around for not much
Diffstat (limited to 'src/convert/render.cpp')
-rw-r--r-- | src/convert/render.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/src/convert/render.cpp b/src/convert/render.cpp index 5c388d07..77ba6dce 100644 --- a/src/convert/render.cpp +++ b/src/convert/render.cpp @@ -21,12 +21,12 @@ void Render_Type(::std::ostream& os, const TypeRef& type, const char *name) void Render_CStruct(::std::ostream& os, const AST::CStruct& str)
{
os << "struct " << str.name() << "{\n";
- for(auto& f : str.fields())
- {
- os << "\t";
- Render_Type(os, f.data, f.name.c_str());
- os << ";\n";
- }
+ //for(auto& f : str.fields())
+ //{
+ // os << "\t";
+ // Render_Type(os, f.data, f.name.c_str());
+ // os << ";\n";
+ //}
os << "}\n";
}
@@ -36,24 +36,24 @@ void Render_Crate(::std::ostream& os, const AST::Flat& crate) for(const auto& s : crate.structs())
os << "struct " << s.mangled_name() << ";\n";
- for(const auto& item : crate.functions())
- {
- const auto& name = item.first;
- const auto& fcn = item.second;
- Render_Type(os, fcn.rettype(), nullptr);
- os << " " << name << "(";
- //bool is_first = true;
- //for(const auto& f : fcn.args())
- //{
- // if( !is_first )
- // os << ", ";
- // is_first = false;
- // // TODO: handle pattern
- // //Render_Type(os, f.second, f.first.c_str());
- //}
- os << ")\n{\n";
- // Dump expression AST
- os << "}\n";
- }
+ //for(const auto& item : crate.functions())
+ //{
+ // const auto& name = item.first;
+ // const auto& fcn = item.second;
+ // Render_Type(os, fcn.rettype(), nullptr);
+ // os << " " << name << "(";
+ // //bool is_first = true;
+ // //for(const auto& f : fcn.args())
+ // //{
+ // // if( !is_first )
+ // // os << ", ";
+ // // is_first = false;
+ // // // TODO: handle pattern
+ // // //Render_Type(os, f.second, f.first.c_str());
+ // //}
+ // os << ")\n{\n";
+ // // Dump expression AST
+ // os << "}\n";
+ //}
}
|