GCC Code Coverage Report


Directory: ../
File: src/ast/AbstractASTVisitor.cpp
Date: 2024-12-24 01:17:15
Exec Total Coverage
Lines: 6 6 100.0%
Functions: 2 2 100.0%
Branches: 6 8 75.0%

Line Branch Exec Source
1 // Copyright (c) 2021-2024 ChilliBits. All rights reserved.
2
3 #include "AbstractASTVisitor.h"
4
5 #include <ast/ASTNodes.h>
6
7 namespace spice::compiler {
8
9 1979036 std::any AbstractASTVisitor::visit(ASTNode *node) { return node->accept(this); }
10
11 858061 std::any AbstractASTVisitor::visitChildren(ASTNode *node) {
12
2/2
✓ Branch 4 taken 932057 times.
✓ Branch 5 taken 857986 times.
1790043 for (ASTNode *child : node->children) {
13
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 932057 times.
932057 assert(child != nullptr);
14
2/2
✓ Branch 1 taken 931982 times.
✓ Branch 2 taken 75 times.
932057 child->accept(this);
15 }
16
1/2
✓ Branch 1 taken 857986 times.
✗ Branch 2 not taken.
857986 return nullptr;
17 }
18
19 } // namespace spice::compiler
20