diff options
| author | Martial Simon <msimon_fr@hotmail.com> | 2025-09-15 01:07:58 +0200 |
|---|---|---|
| committer | Martial Simon <msimon_fr@hotmail.com> | 2025-09-15 01:07:58 +0200 |
| commit | 967be9e750221ab2ab783f95df79bb26d290a45e (patch) | |
| tree | 6802900a5e975f9f68b169f0f503f040056d6952 /tiger-compiler/src/type/named.hxx | |
Diffstat (limited to 'tiger-compiler/src/type/named.hxx')
| -rw-r--r-- | tiger-compiler/src/type/named.hxx | 28 |
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 |
