diff options
Diffstat (limited to 'src/astbranch.h')
-rw-r--r-- | src/astbranch.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/astbranch.h b/src/astbranch.h new file mode 100644 index 0000000..5ff8606 --- /dev/null +++ b/src/astbranch.h | |||
@@ -0,0 +1,27 @@ | |||
1 | #ifndef AST_BRANCH_H | ||
2 | #define AST_BRANCH_H | ||
3 | |||
4 | #include "bu/list.h" | ||
5 | #include "astnode.h" | ||
6 | #include "bu/formatter.h" | ||
7 | |||
8 | class AstBranch : public AstNode | ||
9 | { | ||
10 | public: | ||
11 | typedef Bu::List<AstNode *> NodeList; | ||
12 | typedef Bu::List<NodeList> BranchList; | ||
13 | AstBranch( Type eType ); | ||
14 | virtual ~AstBranch(); | ||
15 | |||
16 | void addBranch(); | ||
17 | void addNode( AstNode *pNode ); | ||
18 | |||
19 | BranchList::const_iterator getBranchBegin() const; | ||
20 | |||
21 | private: | ||
22 | BranchList lBranch; | ||
23 | }; | ||
24 | |||
25 | Bu::Formatter &operator<<( Bu::Formatter &f, const AstBranch &l ); | ||
26 | |||
27 | #endif | ||