diff options
Diffstat (limited to 'src/astbranch.cpp')
-rw-r--r-- | src/astbranch.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/astbranch.cpp b/src/astbranch.cpp index d247b30..83ecdd7 100644 --- a/src/astbranch.cpp +++ b/src/astbranch.cpp | |||
@@ -1,7 +1,7 @@ | |||
1 | #include "astbranch.h" | 1 | #include "astbranch.h" |
2 | 2 | ||
3 | AstBranch::AstBranch( const Location &loc, Type eType ) : | 3 | AstBranch::AstBranch( const Location &loc, Type eType ) : |
4 | AstNode( loc, eType ) | 4 | AstNode( loc, eType ) |
5 | { | 5 | { |
6 | } | 6 | } |
7 | 7 | ||
@@ -11,34 +11,34 @@ AstBranch::~AstBranch() | |||
11 | 11 | ||
12 | void AstBranch::addBranch() | 12 | void AstBranch::addBranch() |
13 | { | 13 | { |
14 | lBranch.append( NodeList() ); | 14 | lBranch.append( NodeList() ); |
15 | } | 15 | } |
16 | 16 | ||
17 | void AstBranch::addNode( AstNode *pNode ) | 17 | void AstBranch::addNode( AstNode *pNode ) |
18 | { | 18 | { |
19 | lBranch.last().append( pNode ); | 19 | lBranch.last().append( pNode ); |
20 | } | 20 | } |
21 | 21 | ||
22 | AstBranch::BranchList::const_iterator AstBranch::getBranchBegin() const | 22 | AstBranch::BranchList::const_iterator AstBranch::getBranchBegin() const |
23 | { | 23 | { |
24 | return lBranch.begin(); | 24 | return lBranch.begin(); |
25 | } | 25 | } |
26 | 26 | ||
27 | Bu::Formatter &operator<<( Bu::Formatter &f, const AstBranch &l ) | 27 | Bu::Formatter &operator<<( Bu::Formatter &f, const AstBranch &l ) |
28 | { | 28 | { |
29 | f.incIndent(); | 29 | f.incIndent(); |
30 | f << ":"; | 30 | f << ":"; |
31 | for( AstBranch::BranchList::const_iterator i = l.getBranchBegin(); i; i++ ) | 31 | for( AstBranch::BranchList::const_iterator i = l.getBranchBegin(); i; i++ ) |
32 | { | 32 | { |
33 | f << f.nl << "Branch:"; | 33 | f << f.nl << "Branch:"; |
34 | f.incIndent(); | 34 | f.incIndent(); |
35 | for( AstBranch::NodeList::const_iterator j = i->begin(); j; j++ ) | 35 | for( AstBranch::NodeList::const_iterator j = i->begin(); j; j++ ) |
36 | { | 36 | { |
37 | f << f.nl << **j; | 37 | f << f.nl << **j; |
38 | } | 38 | } |
39 | f.decIndent(); | 39 | f.decIndent(); |
40 | } | 40 | } |
41 | f.decIndent(); | 41 | f.decIndent(); |
42 | return f; | 42 | return f; |
43 | } | 43 | } |
44 | 44 | ||