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