GCC Code Coverage Report


Directory: ../
File: src/ast/AbstractASTVisitor.cpp
Date: 2025-12-07 00:53:49
Coverage Exec Excl Total
Lines: 100.0% 7 0 7
Functions: 100.0% 2 0 2
Branches: 70.0% 7 0 10

Line Branch Exec Source
1 // Copyright (c) 2021-2025 ChilliBits. All rights reserved.
2
3 #include "AbstractASTVisitor.h"
4
5 #include <ast/ASTNodes.h>
6
7 namespace spice::compiler {
8
9 3367996 std::any AbstractASTVisitor::visit(ASTNode *node) { return node->accept(this); }
10
11 1467273 std::any AbstractASTVisitor::visitChildren(ASTNode *node) {
12
3/4
✓ Branch 2 → 3 taken 1467273 times.
✗ Branch 2 → 20 not taken.
✓ Branch 12 → 5 taken 1520614 times.
✓ Branch 12 → 13 taken 1467195 times.
2987809 for (ASTNode *child : node->getChildren()) {
13
1/2
✗ Branch 6 → 7 not taken.
✓ Branch 6 → 8 taken 1520614 times.
1520614 assert(child != nullptr);
14
2/2
✓ Branch 8 → 9 taken 1520536 times.
✓ Branch 8 → 17 taken 78 times.
1520614 child->accept(this);
15 1467273 }
16
1/2
✓ Branch 14 → 15 taken 1467195 times.
✗ Branch 14 → 21 not taken.
1467195 return nullptr;
17 }
18
19 } // namespace spice::compiler
20