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 | 1969652 | std::any AbstractASTVisitor::visit(ASTNode *node) { return node->accept(this); } | |
10 | |||
11 | 838414 | std::any AbstractASTVisitor::visitChildren(ASTNode *node) { | |
12 |
2/2✓ Branch 4 taken 912410 times.
✓ Branch 5 taken 838345 times.
|
1750755 | for (ASTNode *child : node->children) { |
13 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 912410 times.
|
912410 | assert(child != nullptr); |
14 |
2/2✓ Branch 1 taken 912341 times.
✓ Branch 2 taken 69 times.
|
912410 | child->accept(this); |
15 | } | ||
16 |
1/2✓ Branch 1 taken 838345 times.
✗ Branch 2 not taken.
|
838345 | return nullptr; |
17 | } | ||
18 | |||
19 | } // namespace spice::compiler | ||
20 |