| 181 | |
| 182 | |
| 183 | void cSemanticASTVisitor::VisitIfBlock(cASTIfBlock& node) |
| 184 | { |
| 185 | // Check main condition and code |
| 186 | node.GetCondition()->Accept(*this); |
| 187 | checkCast(node.GetCondition()->GetType(), TYPEINFO(BOOL)); |
| 188 | |
| 189 | node.GetCode()->Accept(*this); |
| 190 | |
| 191 | // Check all elseif blocks |
| 192 | tListIterator<cASTIfBlock::cElseIf> it = node.ElseIfIterator(); |
| 193 | cASTIfBlock::cElseIf* ei = NULL; |
| 194 | while ((ei = it.Next())) { |
| 195 | ei->GetCondition()->Accept(*this); |
| 196 | checkCast(ei->GetCondition()->GetType(), TYPEINFO(BOOL)); |
| 197 | ei->GetCode()->Accept(*this); |
| 198 | } |
| 199 | |
| 200 | // Check else block if there is one |
| 201 | if (node.GetElseCode()) node.GetElseCode()->Accept(*this); |
| 202 | } |
| 203 | |
| 204 | |
| 205 | void cSemanticASTVisitor::VisitWhileBlock(cASTWhileBlock& node) |
nothing calls this directly
no test coverage detected