GCC Code Coverage Report


Directory: ../
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 7 / 0 / 7
Functions: 100.0% 2 / 0 / 2
Branches: 70.0% 7 / 0 / 10

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