| 128 | |
| 129 | |
| 130 | void cDumpASTVisitor::VisitIfBlock(cASTIfBlock& node) |
| 131 | { |
| 132 | indent(); |
| 133 | cout << "if:" << endl; |
| 134 | |
| 135 | m_depth++; |
| 136 | indent(); |
| 137 | cout << "condition:" << endl; |
| 138 | |
| 139 | m_depth++; |
| 140 | node.GetCondition()->Accept(*this); |
| 141 | m_depth--; |
| 142 | |
| 143 | indent(); |
| 144 | cout << "do:" << endl; |
| 145 | |
| 146 | m_depth++; |
| 147 | node.GetCode()->Accept(*this); |
| 148 | m_depth--; |
| 149 | |
| 150 | if (node.HasElseIfs()) { |
| 151 | tListIterator<cASTIfBlock::cElseIf> it = node.ElseIfIterator(); |
| 152 | cASTIfBlock::cElseIf* elif = NULL; |
| 153 | while ((elif = it.Next())) { |
| 154 | indent(); |
| 155 | cout << "elseif:" << endl; |
| 156 | |
| 157 | m_depth++; |
| 158 | indent(); |
| 159 | cout << "condition:" << endl; |
| 160 | |
| 161 | m_depth++; |
| 162 | elif->GetCondition()->Accept(*this); |
| 163 | m_depth--; |
| 164 | |
| 165 | indent(); |
| 166 | cout << "do:" << endl; |
| 167 | |
| 168 | m_depth++; |
| 169 | elif->GetCode()->Accept(*this); |
| 170 | m_depth--; |
| 171 | |
| 172 | m_depth--; |
| 173 | } |
| 174 | } |
| 175 | |
| 176 | if (node.HasElse()) { |
| 177 | indent(); |
| 178 | cout << "else:" << endl; |
| 179 | |
| 180 | m_depth++; |
| 181 | node.GetElseCode()->Accept(*this); |
| 182 | m_depth--; |
| 183 | } |
| 184 | |
| 185 | m_depth--; |
| 186 | |
| 187 | } |
no test coverage detected