blob: 3731f3a12e2eee1eaa33a31965a9f9a3174464d2 (
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
|
// file : cli/traversal/option.cxx
// author : Boris Kolpackov <boris@codesynthesis.com>
// copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC
// license : MIT; see accompanying LICENSE file
#include <traversal/option.hxx>
#include <traversal/expression.hxx>
namespace traversal
{
// belongs
//
void belongs::
traverse (type& e)
{
dispatch (e.type ());
}
// initialized
//
void initialized::
traverse (type& e)
{
dispatch (e.expression ());
}
// option
//
void option::
traverse (type& o)
{
pre (o);
belongs (o);
if (o.initialized_p ())
initialized (o);
post (o);
}
void option::
pre (type&)
{
}
void option::
belongs (type& o)
{
belongs (o, edge_traverser ());
}
void option::
initialized (type& o)
{
initialized (o, edge_traverser ());
}
void option::
post (type&)
{
}
}
|