summaryrefslogtreecommitdiff
path: root/cli/semantics/unit.cxx
blob: 482b4a1756fdee1b7894e1fe110f9c445a440011 (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// file      : cli/semantics/unit.cxx
// author    : Boris Kolpackov <boris@codesynthesis.com>
// copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
// license   : MIT; see accompanying LICENSE file

#include <cutl/compiler/type-info.hxx>

#include <cli/semantics/unit.hxx>

namespace semantics
{
  // type info
  //
  namespace
  {
    struct init
    {
      init ()
      {
        using compiler::type_info;

        // includes
        //
        {
          type_info ti (typeid (includes));
          ti.add_base (typeid (edge));
          insert (ti);
        }

        // cxx_includes
        //
        {
          type_info ti (typeid (cxx_includes));
          ti.add_base (typeid (includes));
          insert (ti);
        }

        // cli_includes
        //
        {
          type_info ti (typeid (cli_includes));
          ti.add_base (typeid (includes));
          insert (ti);
        }

        // cxx_unit
        //
        {
          type_info ti (typeid (cxx_unit));
          ti.add_base (typeid (node));
          insert (ti);
        }

        // cli_unit
        //
        {
          type_info ti (typeid (cli_unit));
          ti.add_base (typeid (namespace_));
          insert (ti);
        }
      }
    } init_;
  }
}