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 | 2076901 | std::any AbstractASTVisitor::visit(ASTNode *node) { return node->accept(this); } | |
| 10 | |||
| 11 | 634916 | std::any AbstractASTVisitor::visitChildren(ASTNode *node) { | |
| 12 |
3/4✓ Branch 2 → 3 taken 634916 times.
✗ Branch 2 → 29 not taken.
✓ Branch 20 → 5 taken 742771 times.
✓ Branch 20 → 21 taken 634837 times.
|
2012524 | for (ASTNode *child : node->getChildren()) { |
| 13 |
1/2✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 742771 times.
|
742771 | assert(child != nullptr); |
| 14 |
2/2✓ Branch 9 → 10 taken 742692 times.
✓ Branch 9 → 26 taken 79 times.
|
742771 | child->accept(this); |
| 15 | 634916 | } | |
| 16 |
1/2✓ Branch 22 → 23 taken 634837 times.
✗ Branch 22 → 30 not taken.
|
1269674 | return nullptr; |
| 17 | } | ||
| 18 | |||
| 19 | } // namespace spice::compiler | ||
| 20 |