summaryrefslogtreecommitdiff
path: root/tiger-compiler/src/type/named.hxx
blob: 1b84bb6facb5a1c4bd733a29aa9d35e24a251183 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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