summaryrefslogtreecommitdiff
path: root/tiger-compiler/src/type/visitor.hxx
blob: 93a0f9bc234043bac748a96ff716ca0d566b9fe3 (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
29
/**
 ** \file type/visitor.hxx
 ** \brief Definition of type::Visitor.
 */

#pragma once

#include <type/type.hh>
#include <type/visitor.hh>

namespace type
{
  template <template <typename> class Const>
  GenVisitor<Const>::~GenVisitor() = default;

  template <template <typename> class Const>
  void GenVisitor<Const>::operator()(const_t<Type>& e)
  {
    e.accept(*this);
  }

  template <template <typename> class Const>
  template <class E>
  void GenVisitor<Const>::operator()(E* e)
  {
    e->accept(*this);
  }

} // namespace type