summaryrefslogtreecommitdiff
path: root/tiger-compiler/src/type/named.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'tiger-compiler/src/type/named.hxx')
-rw-r--r--tiger-compiler/src/type/named.hxx28
1 files changed, 28 insertions, 0 deletions
diff --git a/tiger-compiler/src/type/named.hxx b/tiger-compiler/src/type/named.hxx
new file mode 100644
index 0000000..1b84bb6
--- /dev/null
+++ b/tiger-compiler/src/type/named.hxx
@@ -0,0 +1,28 @@
+/**
+ ** \file type/named.hxx
+ ** \brief Inline methods for type::Named.
+ */
+#pragma once
+
+#include <misc/contract.hh>
+#include <type/named.hh>
+
+namespace type
+{
+ inline const Type* Named::type_get() const { return type_; }
+
+ inline void Named::type_set(const Type* type) const { type_ = type; }
+
+ inline misc::symbol Named::name_get() const { return name_; }
+
+ inline void Named::name_set(misc::symbol name) { name_ = name; }
+
+ inline const Type& Named::actual() const
+ {
+ // FIXME DONE: Some code was deleted here.
+ precondition(type_ != nullptr);
+
+ return type_->actual();
+ }
+
+} // namespace type