GCC Code Coverage Report


Directory: ../
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 95.3% 81 / 0 / 85
Functions: 95.2% 80 / 0 / 84
Branches: 47.6% 161 / 0 / 338

src/visualizer/CSTVisualizer.h
Line Branch Exec Source
1 // Copyright (c) 2021-2026 ChilliBits. All rights reserved.
2
3 #pragma once
4
5 #include <SpiceLexer.h>
6 #include <SpiceVisitor.h>
7
8 #include <CompilerPass.h>
9
10 namespace spice::compiler {
11
12 /**
13 * Visitor for debug purposes (is only executed in the compiler debug mode and when explicitly enabling it via cli flag)
14 *
15 * Jobs:
16 * - Visualize CST
17 */
18 class CSTVisualizer final : CompilerPass, public SpiceVisitor {
19 public:
20 // Constructors
21 1878 CSTVisualizer(GlobalResourceManager &resourceManager, SourceFile *sourceFile, const SpiceLexer *lexer,
22 const SpiceParser *parser)
23
3/6
✓ Branch 4 → 5 taken 1878 times.
✗ Branch 4 → 9 not taken.
✓ Branch 5 → 6 taken 1878 times.
✗ Branch 5 → 9 not taken.
✓ Branch 6 → 7 taken 1878 times.
✗ Branch 6 → 9 not taken.
1878 : CompilerPass(resourceManager, sourceFile), vocabulary(lexer->getVocabulary()), ruleNames(parser->getRuleNames()) {}
24
25 // Visitor methods
26
2/4
✓ Branch 2 → 3 taken 1878 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 1878 times.
✗ Branch 3 → 8 not taken.
3756 std::any visitEntry(SpiceParser::EntryContext *ctx) override { return buildRule(ctx); }
27
2/4
✓ Branch 2 → 3 taken 7 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 7 times.
✗ Branch 3 → 8 not taken.
14 std::any visitMainFunctionDef(SpiceParser::MainFunctionDefContext *ctx) override { return buildRule(ctx); }
28
2/4
✓ Branch 2 → 3 taken 19785 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 19785 times.
✗ Branch 3 → 8 not taken.
39570 std::any visitFunctionDef(SpiceParser::FunctionDefContext *ctx) override { return buildRule(ctx); }
29
2/4
✓ Branch 2 → 3 taken 10302 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 10302 times.
✗ Branch 3 → 8 not taken.
20604 std::any visitProcedureDef(SpiceParser::ProcedureDefContext *ctx) override { return buildRule(ctx); }
30
2/4
✓ Branch 2 → 3 taken 30087 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 30087 times.
✗ Branch 3 → 8 not taken.
60174 std::any visitFctName(SpiceParser::FctNameContext *ctx) override { return buildRule(ctx); }
31
2/4
✓ Branch 2 → 3 taken 1877 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 1877 times.
✗ Branch 3 → 8 not taken.
3754 std::any visitGenericTypeDef(SpiceParser::GenericTypeDefContext *ctx) override { return buildRule(ctx); }
32
2/4
✓ Branch 2 → 3 taken 333 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 333 times.
✗ Branch 3 → 8 not taken.
666 std::any visitAliasDef(SpiceParser::AliasDefContext *ctx) override { return buildRule(ctx); }
33
2/4
✓ Branch 2 → 3 taken 2638 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 2638 times.
✗ Branch 3 → 8 not taken.
5276 std::any visitStructDef(SpiceParser::StructDefContext *ctx) override { return buildRule(ctx); }
34
2/4
✓ Branch 2 → 3 taken 347 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 347 times.
✗ Branch 3 → 8 not taken.
694 std::any visitInterfaceDef(SpiceParser::InterfaceDefContext *ctx) override { return buildRule(ctx); }
35
2/4
✓ Branch 2 → 3 taken 1 time.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 1 time.
✗ Branch 3 → 8 not taken.
2 std::any visitForwardDecl(SpiceParser::ForwardDeclContext *ctx) override { return buildRule(ctx); }
36
2/4
✓ Branch 2 → 3 taken 360 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 360 times.
✗ Branch 3 → 8 not taken.
720 std::any visitEnumDef(SpiceParser::EnumDefContext *ctx) override { return buildRule(ctx); }
37
2/4
✓ Branch 2 → 3 taken 2341 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 2341 times.
✗ Branch 3 → 8 not taken.
4682 std::any visitGlobalVarDef(SpiceParser::GlobalVarDefContext *ctx) override { return buildRule(ctx); }
38
2/4
✓ Branch 2 → 3 taken 2956 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 2956 times.
✗ Branch 3 → 8 not taken.
5912 std::any visitExtDecl(SpiceParser::ExtDeclContext *ctx) override { return buildRule(ctx); }
39
2/4
✓ Branch 2 → 3 taken 2265 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 2265 times.
✗ Branch 3 → 8 not taken.
4530 std::any visitImportDef(SpiceParser::ImportDefContext *ctx) override { return buildRule(ctx); }
40
2/4
✓ Branch 2 → 3 taken 5324 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 5324 times.
✗ Branch 3 → 8 not taken.
10648 std::any visitUnsafeBlock(SpiceParser::UnsafeBlockContext *ctx) override { return buildRule(ctx); }
41
2/4
✓ Branch 2 → 3 taken 2612 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 2612 times.
✗ Branch 3 → 8 not taken.
5224 std::any visitForLoop(SpiceParser::ForLoopContext *ctx) override { return buildRule(ctx); }
42
2/4
✓ Branch 2 → 3 taken 2612 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 2612 times.
✗ Branch 3 → 8 not taken.
5224 std::any visitForHead(SpiceParser::ForHeadContext *ctx) override { return buildRule(ctx); }
43
2/4
✓ Branch 2 → 3 taken 393 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 393 times.
✗ Branch 3 → 8 not taken.
786 std::any visitForeachLoop(SpiceParser::ForeachLoopContext *ctx) override { return buildRule(ctx); }
44
2/4
✓ Branch 2 → 3 taken 393 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 393 times.
✗ Branch 3 → 8 not taken.
786 std::any visitForeachHead(SpiceParser::ForeachHeadContext *ctx) override { return buildRule(ctx); }
45
2/4
✓ Branch 2 → 3 taken 1639 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 1639 times.
✗ Branch 3 → 8 not taken.
3278 std::any visitWhileLoop(SpiceParser::WhileLoopContext *ctx) override { return buildRule(ctx); }
46
2/4
✓ Branch 2 → 3 taken 10 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 10 times.
✗ Branch 3 → 8 not taken.
20 std::any visitDoWhileLoop(SpiceParser::DoWhileLoopContext *ctx) override { return buildRule(ctx); }
47
2/4
✓ Branch 2 → 3 taken 10792 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 10792 times.
✗ Branch 3 → 8 not taken.
21584 std::any visitIfStmt(SpiceParser::IfStmtContext *ctx) override { return buildRule(ctx); }
48
2/4
✓ Branch 2 → 3 taken 936 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 936 times.
✗ Branch 3 → 8 not taken.
1872 std::any visitElseStmt(SpiceParser::ElseStmtContext *ctx) override { return buildRule(ctx); }
49
2/4
✓ Branch 2 → 3 taken 78 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 78 times.
✗ Branch 3 → 8 not taken.
156 std::any visitSwitchStmt(SpiceParser::SwitchStmtContext *ctx) override { return buildRule(ctx); }
50
2/4
✓ Branch 2 → 3 taken 640 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 640 times.
✗ Branch 3 → 8 not taken.
1280 std::any visitCaseBranch(SpiceParser::CaseBranchContext *ctx) override { return buildRule(ctx); }
51
2/4
✓ Branch 2 → 3 taken 66 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 66 times.
✗ Branch 3 → 8 not taken.
132 std::any visitDefaultBranch(SpiceParser::DefaultBranchContext *ctx) override { return buildRule(ctx); }
52
2/4
✓ Branch 2 → 3 taken 1606 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 1606 times.
✗ Branch 3 → 8 not taken.
3212 std::any visitAssertStmt(SpiceParser::AssertStmtContext *ctx) override { return buildRule(ctx); }
53
2/4
✓ Branch 2 → 3 taken 8 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 8 times.
✗ Branch 3 → 8 not taken.
16 std::any visitAnonymousBlockStmt(SpiceParser::AnonymousBlockStmtContext *ctx) override { return buildRule(ctx); }
54
2/4
✓ Branch 2 → 3 taken 52193 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 52193 times.
✗ Branch 3 → 8 not taken.
104386 std::any visitStmtLst(SpiceParser::StmtLstContext *ctx) override { return buildRule(ctx); }
55
2/4
✓ Branch 2 → 3 taken 5007 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 5007 times.
✗ Branch 3 → 8 not taken.
10014 std::any visitField(SpiceParser::FieldContext *ctx) override { return buildRule(ctx); }
56
2/4
✓ Branch 2 → 3 taken 1312 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 1312 times.
✗ Branch 3 → 8 not taken.
2624 std::any visitSignature(SpiceParser::SignatureContext *ctx) override { return buildRule(ctx); }
57
2/4
✓ Branch 2 → 3 taken 18398 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 18398 times.
✗ Branch 3 → 8 not taken.
36796 std::any visitTypeLst(SpiceParser::TypeLstContext *ctx) override { return buildRule(ctx); }
58
2/4
✓ Branch 2 → 3 taken 2751 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 2751 times.
✗ Branch 3 → 8 not taken.
5502 std::any visitTypeLstWithEllipsis(SpiceParser::TypeLstWithEllipsisContext *ctx) override { return buildRule(ctx); }
59
2/4
✓ Branch 2 → 3 taken 1877 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 1877 times.
✗ Branch 3 → 8 not taken.
3754 std::any visitTypeAltsLst(SpiceParser::TypeAltsLstContext *ctx) override { return buildRule(ctx); }
60
2/4
✓ Branch 2 → 3 taken 22739 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 22739 times.
✗ Branch 3 → 8 not taken.
45478 std::any visitParamLst(SpiceParser::ParamLstContext *ctx) override { return buildRule(ctx); }
61
2/4
✓ Branch 2 → 3 taken 34929 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 34929 times.
✗ Branch 3 → 8 not taken.
69858 std::any visitArgLst(SpiceParser::ArgLstContext *ctx) override { return buildRule(ctx); }
62
2/4
✓ Branch 2 → 3 taken 360 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 360 times.
✗ Branch 3 → 8 not taken.
720 std::any visitEnumItemLst(SpiceParser::EnumItemLstContext *ctx) override { return buildRule(ctx); }
63
2/4
✓ Branch 2 → 3 taken 4883 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 4883 times.
✗ Branch 3 → 8 not taken.
9766 std::any visitEnumItem(SpiceParser::EnumItemContext *ctx) override { return buildRule(ctx); }
64
2/4
✓ Branch 2 → 3 taken 70823 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 70823 times.
✗ Branch 3 → 8 not taken.
141646 std::any visitStmt(SpiceParser::StmtContext *ctx) override { return buildRule(ctx); }
65
2/4
✓ Branch 2 → 3 taken 48786 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 48786 times.
✗ Branch 3 → 8 not taken.
97572 std::any visitDeclStmt(SpiceParser::DeclStmtContext *ctx) override { return buildRule(ctx); }
66
2/4
✓ Branch 2 → 3 taken 33570 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 33570 times.
✗ Branch 3 → 8 not taken.
67140 std::any visitExprStmt(SpiceParser::ExprStmtContext *ctx) override { return buildRule(ctx); }
67
2/4
✓ Branch 2 → 3 taken 76726 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 76726 times.
✗ Branch 3 → 8 not taken.
153452 std::any visitQualifierLst(SpiceParser::QualifierLstContext *ctx) override { return buildRule(ctx); }
68
2/4
✓ Branch 2 → 3 taken 90635 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 90635 times.
✗ Branch 3 → 8 not taken.
181270 std::any visitQualifier(SpiceParser::QualifierContext *ctx) override { return buildRule(ctx); }
69
2/4
✓ Branch 2 → 3 taken 683 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 683 times.
✗ Branch 3 → 8 not taken.
1366 std::any visitModAttr(SpiceParser::ModAttrContext *ctx) override { return buildRule(ctx); }
70
2/4
✓ Branch 2 → 3 taken 934 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 934 times.
✗ Branch 3 → 8 not taken.
1868 std::any visitTopLevelDefAttr(SpiceParser::TopLevelDefAttrContext *ctx) override { return buildRule(ctx); }
71 std::any visitLambdaAttr(SpiceParser::LambdaAttrContext *ctx) override { return buildRule(ctx); }
72
2/4
✓ Branch 2 → 3 taken 1617 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 1617 times.
✗ Branch 3 → 8 not taken.
3234 std::any visitAttrLst(SpiceParser::AttrLstContext *ctx) override { return buildRule(ctx); }
73
2/4
✓ Branch 2 → 3 taken 3237 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 3237 times.
✗ Branch 3 → 8 not taken.
6474 std::any visitAttr(SpiceParser::AttrContext *ctx) override { return buildRule(ctx); }
74
2/4
✓ Branch 2 → 3 taken 825 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 825 times.
✗ Branch 3 → 8 not taken.
1650 std::any visitCaseConstant(SpiceParser::CaseConstantContext *ctx) override { return buildRule(ctx); }
75
2/4
✓ Branch 2 → 3 taken 24074 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 24074 times.
✗ Branch 3 → 8 not taken.
48148 std::any visitReturnStmt(SpiceParser::ReturnStmtContext *ctx) override { return buildRule(ctx); }
76
2/4
✓ Branch 2 → 3 taken 224 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 224 times.
✗ Branch 3 → 8 not taken.
448 std::any visitBreakStmt(SpiceParser::BreakStmtContext *ctx) override { return buildRule(ctx); }
77
2/4
✓ Branch 2 → 3 taken 398 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 398 times.
✗ Branch 3 → 8 not taken.
796 std::any visitContinueStmt(SpiceParser::ContinueStmtContext *ctx) override { return buildRule(ctx); }
78 std::any visitFallthroughStmt(SpiceParser::FallthroughStmtContext *ctx) override { return buildRule(ctx); }
79
2/4
✓ Branch 2 → 3 taken 179258 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 179258 times.
✗ Branch 3 → 8 not taken.
358516 std::any visitAssignExpr(SpiceParser::AssignExprContext *ctx) override { return buildRule(ctx); }
80
2/4
✓ Branch 2 → 3 taken 161813 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 161813 times.
✗ Branch 3 → 8 not taken.
323626 std::any visitTernaryExpr(SpiceParser::TernaryExprContext *ctx) override { return buildRule(ctx); }
81
2/4
✓ Branch 2 → 3 taken 163997 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 163997 times.
✗ Branch 3 → 8 not taken.
327994 std::any visitLogicalOrExpr(SpiceParser::LogicalOrExprContext *ctx) override { return buildRule(ctx); }
82
2/4
✓ Branch 2 → 3 taken 166544 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 166544 times.
✗ Branch 3 → 8 not taken.
333088 std::any visitLogicalAndExpr(SpiceParser::LogicalAndExprContext *ctx) override { return buildRule(ctx); }
83
2/4
✓ Branch 2 → 3 taken 167847 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 167847 times.
✗ Branch 3 → 8 not taken.
335694 std::any visitBitwiseOrExpr(SpiceParser::BitwiseOrExprContext *ctx) override { return buildRule(ctx); }
84
2/4
✓ Branch 2 → 3 taken 168106 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 168106 times.
✗ Branch 3 → 8 not taken.
336212 std::any visitBitwiseXorExpr(SpiceParser::BitwiseXorExprContext *ctx) override { return buildRule(ctx); }
85
2/4
✓ Branch 2 → 3 taken 168131 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 168131 times.
✗ Branch 3 → 8 not taken.
336262 std::any visitBitwiseAndExpr(SpiceParser::BitwiseAndExprContext *ctx) override { return buildRule(ctx); }
86
2/4
✓ Branch 2 → 3 taken 168175 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 168175 times.
✗ Branch 3 → 8 not taken.
336350 std::any visitEqualityExpr(SpiceParser::EqualityExprContext *ctx) override { return buildRule(ctx); }
87
2/4
✓ Branch 2 → 3 taken 179765 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 179765 times.
✗ Branch 3 → 8 not taken.
359530 std::any visitRelationalExpr(SpiceParser::RelationalExprContext *ctx) override { return buildRule(ctx); }
88
2/4
✓ Branch 2 → 3 taken 187762 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 187762 times.
✗ Branch 3 → 8 not taken.
375524 std::any visitShiftExpr(SpiceParser::ShiftExprContext *ctx) override { return buildRule(ctx); }
89
2/4
✓ Branch 2 → 3 taken 188740 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 188740 times.
✗ Branch 3 → 8 not taken.
377480 std::any visitAdditiveExpr(SpiceParser::AdditiveExprContext *ctx) override { return buildRule(ctx); }
90
2/4
✓ Branch 2 → 3 taken 197391 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 197391 times.
✗ Branch 3 → 8 not taken.
394782 std::any visitMultiplicativeExpr(SpiceParser::MultiplicativeExprContext *ctx) override { return buildRule(ctx); }
91
2/4
✓ Branch 2 → 3 taken 200515 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 200515 times.
✗ Branch 3 → 8 not taken.
401030 std::any visitCastExpr(SpiceParser::CastExprContext *ctx) override { return buildRule(ctx); }
92
2/4
✓ Branch 2 → 3 taken 216469 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 216469 times.
✗ Branch 3 → 8 not taken.
432938 std::any visitPrefixUnaryExpr(SpiceParser::PrefixUnaryExprContext *ctx) override { return buildRule(ctx); }
93
2/4
✓ Branch 2 → 3 taken 271263 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 271263 times.
✗ Branch 3 → 8 not taken.
542526 std::any visitPostfixUnaryExpr(SpiceParser::PostfixUnaryExprContext *ctx) override { return buildRule(ctx); }
94
2/4
✓ Branch 2 → 3 taken 212621 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 212621 times.
✗ Branch 3 → 8 not taken.
425242 std::any visitAtomicExpr(SpiceParser::AtomicExprContext *ctx) override { return buildRule(ctx); }
95
2/4
✓ Branch 2 → 3 taken 51415 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 51415 times.
✗ Branch 3 → 8 not taken.
102830 std::any visitValue(SpiceParser::ValueContext *ctx) override { return buildRule(ctx); }
96
2/4
✓ Branch 2 → 3 taken 46389 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 46389 times.
✗ Branch 3 → 8 not taken.
92778 std::any visitFctCall(SpiceParser::FctCallContext *ctx) override { return buildRule(ctx); }
97
2/4
✓ Branch 2 → 3 taken 218 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 218 times.
✗ Branch 3 → 8 not taken.
436 std::any visitArrayInitialization(SpiceParser::ArrayInitializationContext *ctx) override { return buildRule(ctx); }
98
2/4
✓ Branch 2 → 3 taken 859 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 859 times.
✗ Branch 3 → 8 not taken.
1718 std::any visitStructInstantiation(SpiceParser::StructInstantiationContext *ctx) override { return buildRule(ctx); }
99 std::any visitLambdaFunc(SpiceParser::LambdaFuncContext *ctx) override { return buildRule(ctx); }
100
2/4
✓ Branch 2 → 3 taken 49 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 49 times.
✗ Branch 3 → 8 not taken.
98 std::any visitLambdaProc(SpiceParser::LambdaProcContext *ctx) override { return buildRule(ctx); }
101 std::any visitLambdaExpr(SpiceParser::LambdaExprContext *ctx) override { return buildRule(ctx); }
102
2/4
✓ Branch 2 → 3 taken 38052 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 38052 times.
✗ Branch 3 → 8 not taken.
76104 std::any visitConstant(SpiceParser::ConstantContext *ctx) override { return buildRule(ctx); }
103
2/4
✓ Branch 2 → 3 taken 118280 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 118280 times.
✗ Branch 3 → 8 not taken.
236560 std::any visitDataType(SpiceParser::DataTypeContext *ctx) override { return buildRule(ctx); }
104
2/4
✓ Branch 2 → 3 taken 118280 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 118280 times.
✗ Branch 3 → 8 not taken.
236560 std::any visitBaseDataType(SpiceParser::BaseDataTypeContext *ctx) override { return buildRule(ctx); }
105
2/4
✓ Branch 2 → 3 taken 54885 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 54885 times.
✗ Branch 3 → 8 not taken.
109770 std::any visitCustomDataType(SpiceParser::CustomDataTypeContext *ctx) override { return buildRule(ctx); }
106
2/4
✓ Branch 2 → 3 taken 137 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 137 times.
✗ Branch 3 → 8 not taken.
274 std::any visitFunctionDataType(SpiceParser::FunctionDataTypeContext *ctx) override { return buildRule(ctx); }
107
2/4
✓ Branch 2 → 3 taken 18484 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 18484 times.
✗ Branch 3 → 8 not taken.
36968 std::any visitAssignOp(SpiceParser::AssignOpContext *ctx) override { return buildRule(ctx); }
108
2/4
✓ Branch 2 → 3 taken 3523 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 3523 times.
✗ Branch 3 → 8 not taken.
7046 std::any visitOverloadableOp(SpiceParser::OverloadableOpContext *ctx) override { return buildRule(ctx); }
109
110 private:
111 // Members
112 const antlr4::dfa::Vocabulary &vocabulary;
113 const std::vector<std::string> ruleNames;
114 int currentTabs = 1;
115 std::string parentNodeId;
116
117 // Private methods
118 std::string buildRule(const antlr4::ParserRuleContext *ctx);
119 [[nodiscard]] std::string getSpaces() const;
120 [[nodiscard]] static std::string tokenToCodeLoc(const antlr4::Token &token);
121 };
122
123 } // namespace spice::compiler
124