3 //=============================================================================
7 * Visitor for the Union class.
8 * This one is a generic visitor.
10 * @author Aniruddha Gokhale
12 //=============================================================================
15 #ifndef _BE_VISITOR_UNION_UNION_H_
16 #define _BE_VISITOR_UNION_UNION_H_
19 * @class be_visitor_union
21 * @brief be_visitor_union
23 * This is the base visitor for union
25 class be_visitor_union
: public be_visitor_scope
29 be_visitor_union (be_visitor_context
*ctx
);
34 /// visit union. We provide code for this method in the derived class
35 virtual int visit_union (be_union
*node
);
37 // =visit operations on syntactically valid elements in our scope
39 /// visit union_branch
40 virtual int visit_union_branch (be_union_branch
*node
);
42 enum BoolUnionBranch
{ BUB_NONE
, BUB_UNCONDITIONAL
, BUB_TRUE
, BUB_FALSE
};
44 static BoolUnionBranch
boolean_branch (be_union_branch
*b
);
47 #endif /* _BE_VISITOR_UNION_UNION_H_ */