summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile1
-rw-r--r--src/ast/ast.hpp21
-rw-r--r--src/convert/flatten.cpp9
-rw-r--r--src/convert/render.cpp59
4 files changed, 1 insertions, 89 deletions
diff --git a/Makefile b/Makefile
index f4bf8931..56d1496b 100644
--- a/Makefile
+++ b/Makefile
@@ -35,7 +35,6 @@ OBJ += dump_as_rust.o
OBJ += convert/ast_iterate.o
#OBJ += convert/decorators.o
OBJ += convert/resolve.o convert/typecheck_bounds.o convert/typecheck_params.o convert/typecheck_expr.o
-OBJ += convert/flatten.o convert/render.o
OBJ += synexts/derive.o synexts/lang_item.o
PCHS := ast/ast.hpp
diff --git a/src/ast/ast.hpp b/src/ast/ast.hpp
index 504d3704..1057bc79 100644
--- a/src/ast/ast.hpp
+++ b/src/ast/ast.hpp
@@ -397,7 +397,7 @@ class Module:
// --- Runtime caches and state ---
- ::std::vector<Module*> m_anon_modules; // TODO: Should this be serialisable?
+ ::std::vector<Module*> m_anon_modules;
::std::vector< NamedNS<const MacroRules*> > m_macro_import_res; // Vec of imported macros (not serialised)
::std::vector< Named<MacroRules> > m_macros;
@@ -575,25 +575,6 @@ struct ImplRef
::rust::option<char> find_named_item(const ::std::string& name) const;
};
-class CStruct
-{
-// ::std::vector<StructItem> m_fields;
-public:
- const char* name() const { return "TODO"; }
- const char* mangled_name() const { return "TODO"; }
-// const ::std::vector<StructItem>& fields() const { return m_fields; }
-};
-
-class Flat
-{
- ::std::vector<CStruct> m_structs;
-// ::std::vector< ::std::pair< ::std::string,Function> > m_functions;
-public:
-
-// const ::std::vector< ::std::pair< ::std::string, Function> >& functions() const { return m_functions; }
- const ::std::vector<CStruct>& structs() const { return m_structs; }
-};
-
} // namespace AST
class GenericResolveClosure
diff --git a/src/convert/flatten.cpp b/src/convert/flatten.cpp
deleted file mode 100644
index bede5417..00000000
--- a/src/convert/flatten.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
- */
-#include "../ast/ast.hpp"
-#include "../parse/parseerror.hpp"
-
-AST::Flat Convert_Flatten(const AST::Crate& crate)
-{
- throw ParseError::Todo("Flatten");
-}
diff --git a/src/convert/render.cpp b/src/convert/render.cpp
deleted file mode 100644
index 77ba6dce..00000000
--- a/src/convert/render.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- */
-#include "../common.hpp"
-#include "../ast/ast.hpp"
-#include <iostream>
-
-typedef ::std::vector< ::std::pair< ::std::string, TypeRef> > item_vec_t;
-
-void Render_Type(::std::ostream& os, const TypeRef& type, const char *name)
-{
- /*
- switch(type.class())
- {
- case TYPECLASS_STRUCT:
- os << "struct " << type.struct().mangled_name() << " " << name;
- break;
- }
- */
-}
-
-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";
- //}
- os << "}\n";
-}
-
-void Render_Crate(::std::ostream& os, const AST::Flat& crate)
-{
- // First off, print forward declarations of all structs + enums
- 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";
- //}
-}
-