summaryrefslogtreecommitdiff
path: root/tiger-compiler/src/type/builtin-types.hh
diff options
context:
space:
mode:
Diffstat (limited to 'tiger-compiler/src/type/builtin-types.hh')
-rw-r--r--tiger-compiler/src/type/builtin-types.hh40
1 files changed, 40 insertions, 0 deletions
diff --git a/tiger-compiler/src/type/builtin-types.hh b/tiger-compiler/src/type/builtin-types.hh
new file mode 100644
index 0000000..40295eb
--- /dev/null
+++ b/tiger-compiler/src/type/builtin-types.hh
@@ -0,0 +1,40 @@
+/**
+ ** \file type/builtin-types.hh
+ ** \brief The classes Int, String, Void.
+ */
+#pragma once
+
+#include <misc/singleton.hh>
+#include <type/fwd.hh>
+#include <type/type.hh>
+
+namespace type
+{
+ // FIXME DONE: Some code was deleted here (Other types : Int, String, Void).
+
+ class Int
+ : public Type
+ , public misc::Singleton<Int>
+ {
+ public:
+ void accept(ConstVisitor& v) const override;
+ void accept(Visitor& v) override;
+ };
+ class Void
+ : public Type
+ , public misc::Singleton<Void>
+ {
+ public:
+ void accept(ConstVisitor& v) const override;
+ void accept(Visitor& v) override;
+ };
+ class String
+ : public Type
+ , public misc::Singleton<String>
+ {
+ public:
+ void accept(ConstVisitor& v) const override;
+ void accept(Visitor& v) override;
+ };
+
+} // namespace type