summaryrefslogtreecommitdiff
path: root/tiger-compiler/src/object/libobject.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tiger-compiler/src/object/libobject.cc')
-rw-r--r--tiger-compiler/src/object/libobject.cc49
1 files changed, 49 insertions, 0 deletions
diff --git a/tiger-compiler/src/object/libobject.cc b/tiger-compiler/src/object/libobject.cc
new file mode 100644
index 0000000..b7c7f72
--- /dev/null
+++ b/tiger-compiler/src/object/libobject.cc
@@ -0,0 +1,49 @@
+/**
+ ** \file object/libobject.cc
+ ** \brief Define exported object functions.
+ */
+
+// FIXME DONE: Some code was deleted here.
+#include <object/libobject.hh>
+#include <object/binder.hh>
+#include <object/renamer.hh>
+#include <object/type-checker.hh>
+
+namespace object
+{
+ /*-------.
+ | Bind. |
+ `-------*/
+
+ // FIXME DONE: Some code was deleted here.
+ misc::error bind_obj(ast::ChunkList* d)
+ {
+ Binder bdc = Binder();
+ bdc(d);
+ return bdc.error_get();
+ }
+
+ /*----------------.
+ | Compute types. |
+ `----------------*/
+
+ misc::error types_check(ast::Ast& tree)
+ {
+ TypeChecker type;
+ type(tree);
+ return type.error_get();
+ }
+
+ /*---------.
+ | Rename. |
+ `---------*/
+
+ class_names_type* rename(ast::Ast& tree)
+ {
+ // Rename.
+ Renamer rename;
+ rename(tree);
+ return rename.class_names_get();
+ }
+
+} // namespace object