| 260 | |
| 261 | |
| 262 | void cDirectInterpretASTVisitor::VisitIfBlock(cASTIfBlock& node) |
| 263 | { |
| 264 | node.GetCondition()->Accept(*this); |
| 265 | |
| 266 | if (asBool(m_rtype, m_rvalue, node)) { |
| 267 | node.GetCode()->Accept(*this); |
| 268 | } else { |
| 269 | bool exec = false; |
| 270 | tListIterator<cASTIfBlock::cElseIf> it = node.ElseIfIterator(); |
| 271 | cASTIfBlock::cElseIf* ei = NULL; |
| 272 | while ((ei = it.Next())) { |
| 273 | ei->GetCondition()->Accept(*this); |
| 274 | if (asBool(m_rtype, m_rvalue, node)) { |
| 275 | exec = true; |
| 276 | ei->GetCode()->Accept(*this); |
| 277 | break; |
| 278 | } |
| 279 | } |
| 280 | |
| 281 | if (!exec && node.HasElse()) node.GetElseCode()->Accept(*this); |
| 282 | } |
| 283 | } |
| 284 | |
| 285 | |
| 286 | void cDirectInterpretASTVisitor::VisitWhileBlock(cASTWhileBlock& node) |
nothing calls this directly
no test coverage detected