src/ast/AbstractASTVisitor.cpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | // Copyright (c) 2021-2026 ChilliBits. All rights reserved. | ||
| 2 | |||
| 3 | #include "AbstractASTVisitor.h" | ||
| 4 | |||
| 5 | #include <ast/ASTNodes.h> | ||
| 6 | |||
| 7 | namespace spice::compiler { | ||
| 8 | |||
| 9 | 1300185 | std::any AbstractASTVisitor::visit(ASTNode *node) { return node->accept(this); } | |
| 10 | |||
| 11 | 405244 | std::any AbstractASTVisitor::visitChildren(ASTNode *node) { | |
| 12 |
3/4✓ Branch 2 → 3 taken 405244 times.
✗ Branch 2 → 29 not taken.
✓ Branch 20 → 5 taken 472323 times.
✓ Branch 20 → 21 taken 405165 times.
|
1282732 | for (ASTNode *child : node->getChildren()) { |
| 13 |
1/2✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 472323 times.
|
472323 | assert(child != nullptr); |
| 14 |
2/2✓ Branch 9 → 10 taken 472244 times.
✓ Branch 9 → 26 taken 79 times.
|
472323 | child->accept(this); |
| 15 | 405244 | } | |
| 16 |
1/2✓ Branch 22 → 23 taken 405165 times.
✗ Branch 22 → 30 not taken.
|
810330 | return nullptr; |
| 17 | } | ||
| 18 | |||
| 19 | } // namespace spice::compiler | ||
| 20 |