summaryrefslogtreecommitdiff
path: root/cli/traversal/unit.cxx
blob: 21da3697689a570d0a042871bdf99f7645516dec (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
// file      : cli/traversal/unit.cxx
// author    : Boris Kolpackov <boris@codesynthesis.com>
// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC
// license   : MIT; see accompanying LICENSE file

#include <cli/traversal/unit.hxx>

namespace traversal
{
  // cxx_includes
  //
  void cxx_includes::
  traverse (type& e)
  {
    dispatch (e.includee ());
  }

  // cli_includes
  //
  void cli_includes::
  traverse (type& e)
  {
    dispatch (e.includee ());
  }

  // cli_unit
  //
  void cli_unit::
  traverse (type& u)
  {
    pre (u);
    iterate_and_dispatch (
      u.includes_begin (), u.includes_end (), edge_traverser ());
    names (u);
    post (u);
  }

  void cli_unit::
  pre (type&)
  {
  }

  void cli_unit::
  post (type&)
  {
  }
}