blob: 390655bc5f317a43357220fd69ba16466b05df1f (
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
|
/* -*- c++ -*- */
//=============================================================================
/**
* @file union.h
*
* Visitor for the Union class.
* This one is a generic visitor.
*
* @author Aniruddha Gokhale
*/
//=============================================================================
#ifndef _BE_VISITOR_UNION_UNION_H_
#define _BE_VISITOR_UNION_UNION_H_
/**
* @class be_visitor_union
*
* @brief be_visitor_union
*
* This is the base visitor for union
*/
class be_visitor_union : public be_visitor_scope
{
public:
/// constructor
be_visitor_union (be_visitor_context *ctx);
/// destructor
~be_visitor_union ();
/// visit union. We provide code for this method in the derived class
virtual int visit_union (be_union *node);
// =visit operations on syntactically valid elements in our scope
/// visit union_branch
virtual int visit_union_branch (be_union_branch *node);
enum BoolUnionBranch { BUB_NONE, BUB_UNCONDITIONAL, BUB_TRUE, BUB_FALSE };
static BoolUnionBranch boolean_branch (be_union_branch *b);
};
#endif /* _BE_VISITOR_UNION_UNION_H_ */
|