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 | 3714 | CSTVisualizer(GlobalResourceManager &resourceManager, SourceFile *sourceFile, const SpiceLexer *lexer, | |
| 22 | const SpiceParser *parser) | ||
| 23 |
3/6✓ Branch 4 → 5 taken 3714 times.
✗ Branch 4 → 9 not taken.
✓ Branch 5 → 6 taken 3714 times.
✗ Branch 5 → 9 not taken.
✓ Branch 6 → 7 taken 3714 times.
✗ Branch 6 → 9 not taken.
|
3714 | : CompilerPass(resourceManager, sourceFile), vocabulary(lexer->getVocabulary()), ruleNames(parser->getRuleNames()) {} |
| 24 | |||
| 25 | // Visitor methods | ||
| 26 |
2/4✓ Branch 2 → 3 taken 3714 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 3714 times.
✗ Branch 3 → 8 not taken.
|
7428 | std::any visitEntry(SpiceParser::EntryContext *ctx) override { return buildRule(ctx); } |
| 27 |
2/4✓ Branch 2 → 3 taken 14 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 14 times.
✗ Branch 3 → 8 not taken.
|
28 | std::any visitMainFunctionDef(SpiceParser::MainFunctionDefContext *ctx) override { return buildRule(ctx); } |
| 28 |
2/4✓ Branch 2 → 3 taken 34658 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 34658 times.
✗ Branch 3 → 8 not taken.
|
69316 | std::any visitFunctionDef(SpiceParser::FunctionDefContext *ctx) override { return buildRule(ctx); } |
| 29 |
2/4✓ Branch 2 → 3 taken 21876 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 21876 times.
✗ Branch 3 → 8 not taken.
|
43752 | std::any visitProcedureDef(SpiceParser::ProcedureDefContext *ctx) override { return buildRule(ctx); } |
| 30 |
2/4✓ Branch 2 → 3 taken 56534 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 56534 times.
✗ Branch 3 → 8 not taken.
|
113068 | std::any visitFctName(SpiceParser::FctNameContext *ctx) override { return buildRule(ctx); } |
| 31 |
2/4✓ Branch 2 → 3 taken 3787 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 3787 times.
✗ Branch 3 → 8 not taken.
|
7574 | std::any visitGenericTypeDef(SpiceParser::GenericTypeDefContext *ctx) override { return buildRule(ctx); } |
| 32 |
2/4✓ Branch 2 → 3 taken 265 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 265 times.
✗ Branch 3 → 8 not taken.
|
530 | std::any visitAliasDef(SpiceParser::AliasDefContext *ctx) override { return buildRule(ctx); } |
| 33 |
2/4✓ Branch 2 → 3 taken 3567 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 3567 times.
✗ Branch 3 → 8 not taken.
|
7134 | std::any visitStructDef(SpiceParser::StructDefContext *ctx) override { return buildRule(ctx); } |
| 34 |
2/4✓ Branch 2 → 3 taken 369 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 369 times.
✗ Branch 3 → 8 not taken.
|
738 | std::any visitInterfaceDef(SpiceParser::InterfaceDefContext *ctx) override { return buildRule(ctx); } |
| 35 | ✗ | std::any visitUnionDef(SpiceParser::UnionDefContext *ctx) override { return buildRule(ctx); } | |
| 36 |
2/4✓ Branch 2 → 3 taken 620 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 620 times.
✗ Branch 3 → 8 not taken.
|
1240 | std::any visitEnumDef(SpiceParser::EnumDefContext *ctx) override { return buildRule(ctx); } |
| 37 |
2/4✓ Branch 2 → 3 taken 4891 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 4891 times.
✗ Branch 3 → 8 not taken.
|
9782 | std::any visitGlobalVarDef(SpiceParser::GlobalVarDefContext *ctx) override { return buildRule(ctx); } |
| 38 |
2/4✓ Branch 2 → 3 taken 6482 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 6482 times.
✗ Branch 3 → 8 not taken.
|
12964 | std::any visitExtDecl(SpiceParser::ExtDeclContext *ctx) override { return buildRule(ctx); } |
| 39 |
2/4✓ Branch 2 → 3 taken 2635 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 2635 times.
✗ Branch 3 → 8 not taken.
|
5270 | std::any visitImportDef(SpiceParser::ImportDefContext *ctx) override { return buildRule(ctx); } |
| 40 |
2/4✓ Branch 2 → 3 taken 15313 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 15313 times.
✗ Branch 3 → 8 not taken.
|
30626 | std::any visitUnsafeBlock(SpiceParser::UnsafeBlockContext *ctx) override { return buildRule(ctx); } |
| 41 |
2/4✓ Branch 2 → 3 taken 5085 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 5085 times.
✗ Branch 3 → 8 not taken.
|
10170 | std::any visitForLoop(SpiceParser::ForLoopContext *ctx) override { return buildRule(ctx); } |
| 42 |
2/4✓ Branch 2 → 3 taken 5085 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 5085 times.
✗ Branch 3 → 8 not taken.
|
10170 | std::any visitForHead(SpiceParser::ForHeadContext *ctx) override { return buildRule(ctx); } |
| 43 |
2/4✓ Branch 2 → 3 taken 287 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 287 times.
✗ Branch 3 → 8 not taken.
|
574 | std::any visitForeachLoop(SpiceParser::ForeachLoopContext *ctx) override { return buildRule(ctx); } |
| 44 |
2/4✓ Branch 2 → 3 taken 287 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 287 times.
✗ Branch 3 → 8 not taken.
|
574 | std::any visitForeachHead(SpiceParser::ForeachHeadContext *ctx) override { return buildRule(ctx); } |
| 45 |
2/4✓ Branch 2 → 3 taken 2438 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 2438 times.
✗ Branch 3 → 8 not taken.
|
4876 | std::any visitWhileLoop(SpiceParser::WhileLoopContext *ctx) override { return buildRule(ctx); } |
| 46 | ✗ | std::any visitDoWhileLoop(SpiceParser::DoWhileLoopContext *ctx) override { return buildRule(ctx); } | |
| 47 |
2/4✓ Branch 2 → 3 taken 31650 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 31650 times.
✗ Branch 3 → 8 not taken.
|
63300 | std::any visitIfStmt(SpiceParser::IfStmtContext *ctx) override { return buildRule(ctx); } |
| 48 |
2/4✓ Branch 2 → 3 taken 1995 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 1995 times.
✗ Branch 3 → 8 not taken.
|
3990 | std::any visitElseStmt(SpiceParser::ElseStmtContext *ctx) override { return buildRule(ctx); } |
| 49 |
2/4✓ Branch 2 → 3 taken 22 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 22 times.
✗ Branch 3 → 8 not taken.
|
44 | std::any visitSwitchStmt(SpiceParser::SwitchStmtContext *ctx) override { return buildRule(ctx); } |
| 50 |
2/4✓ Branch 2 → 3 taken 238 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 238 times.
✗ Branch 3 → 8 not taken.
|
476 | std::any visitCaseBranch(SpiceParser::CaseBranchContext *ctx) override { return buildRule(ctx); } |
| 51 |
2/4✓ Branch 2 → 3 taken 18 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 18 times.
✗ Branch 3 → 8 not taken.
|
36 | std::any visitDefaultBranch(SpiceParser::DefaultBranchContext *ctx) override { return buildRule(ctx); } |
| 52 |
2/4✓ Branch 2 → 3 taken 903 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 903 times.
✗ Branch 3 → 8 not taken.
|
1806 | std::any visitAssertStmt(SpiceParser::AssertStmtContext *ctx) override { return buildRule(ctx); } |
| 53 |
2/4✓ Branch 2 → 3 taken 2 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 2 times.
✗ Branch 3 → 8 not taken.
|
4 | std::any visitAnonymousBlockStmt(SpiceParser::AnonymousBlockStmtContext *ctx) override { return buildRule(ctx); } |
| 54 |
2/4✓ Branch 2 → 3 taken 112767 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 112767 times.
✗ Branch 3 → 8 not taken.
|
225534 | std::any visitStmtLst(SpiceParser::StmtLstContext *ctx) override { return buildRule(ctx); } |
| 55 |
2/4✓ Branch 2 → 3 taken 9115 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 9115 times.
✗ Branch 3 → 8 not taken.
|
18230 | std::any visitField(SpiceParser::FieldContext *ctx) override { return buildRule(ctx); } |
| 56 |
2/4✓ Branch 2 → 3 taken 884 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 884 times.
✗ Branch 3 → 8 not taken.
|
1768 | std::any visitSignature(SpiceParser::SignatureContext *ctx) override { return buildRule(ctx); } |
| 57 |
2/4✓ Branch 2 → 3 taken 36289 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 36289 times.
✗ Branch 3 → 8 not taken.
|
72578 | std::any visitTypeLst(SpiceParser::TypeLstContext *ctx) override { return buildRule(ctx); } |
| 58 |
2/4✓ Branch 2 → 3 taken 6396 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 6396 times.
✗ Branch 3 → 8 not taken.
|
12792 | std::any visitTypeLstWithEllipsis(SpiceParser::TypeLstWithEllipsisContext *ctx) override { return buildRule(ctx); } |
| 59 |
2/4✓ Branch 2 → 3 taken 3787 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 3787 times.
✗ Branch 3 → 8 not taken.
|
7574 | std::any visitTypeAltsLst(SpiceParser::TypeAltsLstContext *ctx) override { return buildRule(ctx); } |
| 60 |
2/4✓ Branch 2 → 3 taken 40919 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 40919 times.
✗ Branch 3 → 8 not taken.
|
81838 | std::any visitParamLst(SpiceParser::ParamLstContext *ctx) override { return buildRule(ctx); } |
| 61 |
2/4✓ Branch 2 → 3 taken 65265 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 65265 times.
✗ Branch 3 → 8 not taken.
|
130530 | std::any visitArgLst(SpiceParser::ArgLstContext *ctx) override { return buildRule(ctx); } |
| 62 |
2/4✓ Branch 2 → 3 taken 620 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 620 times.
✗ Branch 3 → 8 not taken.
|
1240 | std::any visitEnumItemLst(SpiceParser::EnumItemLstContext *ctx) override { return buildRule(ctx); } |
| 63 |
2/4✓ Branch 2 → 3 taken 3274 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 3274 times.
✗ Branch 3 → 8 not taken.
|
6548 | std::any visitEnumItem(SpiceParser::EnumItemContext *ctx) override { return buildRule(ctx); } |
| 64 |
2/4✓ Branch 2 → 3 taken 152891 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 152891 times.
✗ Branch 3 → 8 not taken.
|
305782 | std::any visitStmt(SpiceParser::StmtContext *ctx) override { return buildRule(ctx); } |
| 65 |
2/4✓ Branch 2 → 3 taken 98234 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 98234 times.
✗ Branch 3 → 8 not taken.
|
196468 | std::any visitDeclStmt(SpiceParser::DeclStmtContext *ctx) override { return buildRule(ctx); } |
| 66 |
2/4✓ Branch 2 → 3 taken 74010 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 74010 times.
✗ Branch 3 → 8 not taken.
|
148020 | std::any visitExprStmt(SpiceParser::ExprStmtContext *ctx) override { return buildRule(ctx); } |
| 67 |
2/4✓ Branch 2 → 3 taken 154116 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 154116 times.
✗ Branch 3 → 8 not taken.
|
308232 | std::any visitQualifierLst(SpiceParser::QualifierLstContext *ctx) override { return buildRule(ctx); } |
| 68 |
2/4✓ Branch 2 → 3 taken 187484 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 187484 times.
✗ Branch 3 → 8 not taken.
|
374968 | std::any visitQualifier(SpiceParser::QualifierContext *ctx) override { return buildRule(ctx); } |
| 69 |
2/4✓ Branch 2 → 3 taken 1975 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 1975 times.
✗ Branch 3 → 8 not taken.
|
3950 | std::any visitModAttr(SpiceParser::ModAttrContext *ctx) override { return buildRule(ctx); } |
| 70 |
2/4✓ Branch 2 → 3 taken 1769 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 1769 times.
✗ Branch 3 → 8 not taken.
|
3538 | 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 3744 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 3744 times.
✗ Branch 3 → 8 not taken.
|
7488 | std::any visitAttrLst(SpiceParser::AttrLstContext *ctx) override { return buildRule(ctx); } |
| 73 |
2/4✓ Branch 2 → 3 taken 4364 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 4364 times.
✗ Branch 3 → 8 not taken.
|
8728 | std::any visitAttr(SpiceParser::AttrContext *ctx) override { return buildRule(ctx); } |
| 74 |
2/4✓ Branch 2 → 3 taken 244 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 244 times.
✗ Branch 3 → 8 not taken.
|
488 | std::any visitCaseConstant(SpiceParser::CaseConstantContext *ctx) override { return buildRule(ctx); } |
| 75 |
2/4✓ Branch 2 → 3 taken 49965 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 49965 times.
✗ Branch 3 → 8 not taken.
|
99930 | std::any visitReturnStmt(SpiceParser::ReturnStmtContext *ctx) override { return buildRule(ctx); } |
| 76 |
2/4✓ Branch 2 → 3 taken 926 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 926 times.
✗ Branch 3 → 8 not taken.
|
1852 | std::any visitBreakStmt(SpiceParser::BreakStmtContext *ctx) override { return buildRule(ctx); } |
| 77 |
2/4✓ Branch 2 → 3 taken 894 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 894 times.
✗ Branch 3 → 8 not taken.
|
1788 | 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 377271 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 377271 times.
✗ Branch 3 → 8 not taken.
|
754542 | std::any visitAssignExpr(SpiceParser::AssignExprContext *ctx) override { return buildRule(ctx); } |
| 80 |
2/4✓ Branch 2 → 3 taken 341528 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 341528 times.
✗ Branch 3 → 8 not taken.
|
683056 | std::any visitTernaryExpr(SpiceParser::TernaryExprContext *ctx) override { return buildRule(ctx); } |
| 81 |
2/4✓ Branch 2 → 3 taken 347870 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 347870 times.
✗ Branch 3 → 8 not taken.
|
695740 | std::any visitLogicalOrExpr(SpiceParser::LogicalOrExprContext *ctx) override { return buildRule(ctx); } |
| 82 |
2/4✓ Branch 2 → 3 taken 354435 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 354435 times.
✗ Branch 3 → 8 not taken.
|
708870 | std::any visitLogicalAndExpr(SpiceParser::LogicalAndExprContext *ctx) override { return buildRule(ctx); } |
| 83 |
2/4✓ Branch 2 → 3 taken 357260 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 357260 times.
✗ Branch 3 → 8 not taken.
|
714520 | std::any visitBitwiseOrExpr(SpiceParser::BitwiseOrExprContext *ctx) override { return buildRule(ctx); } |
| 84 |
2/4✓ Branch 2 → 3 taken 357844 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 357844 times.
✗ Branch 3 → 8 not taken.
|
715688 | std::any visitBitwiseXorExpr(SpiceParser::BitwiseXorExprContext *ctx) override { return buildRule(ctx); } |
| 85 |
2/4✓ Branch 2 → 3 taken 357949 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 357949 times.
✗ Branch 3 → 8 not taken.
|
715898 | std::any visitBitwiseAndExpr(SpiceParser::BitwiseAndExprContext *ctx) override { return buildRule(ctx); } |
| 86 |
2/4✓ Branch 2 → 3 taken 358343 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 358343 times.
✗ Branch 3 → 8 not taken.
|
716686 | std::any visitEqualityExpr(SpiceParser::EqualityExprContext *ctx) override { return buildRule(ctx); } |
| 87 |
2/4✓ Branch 2 → 3 taken 389965 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 389965 times.
✗ Branch 3 → 8 not taken.
|
779930 | std::any visitRelationalExpr(SpiceParser::RelationalExprContext *ctx) override { return buildRule(ctx); } |
| 88 |
2/4✓ Branch 2 → 3 taken 409832 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 409832 times.
✗ Branch 3 → 8 not taken.
|
819664 | std::any visitShiftExpr(SpiceParser::ShiftExprContext *ctx) override { return buildRule(ctx); } |
| 89 |
2/4✓ Branch 2 → 3 taken 410948 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 410948 times.
✗ Branch 3 → 8 not taken.
|
821896 | std::any visitAdditiveExpr(SpiceParser::AdditiveExprContext *ctx) override { return buildRule(ctx); } |
| 90 |
2/4✓ Branch 2 → 3 taken 431616 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 431616 times.
✗ Branch 3 → 8 not taken.
|
863232 | std::any visitMultiplicativeExpr(SpiceParser::MultiplicativeExprContext *ctx) override { return buildRule(ctx); } |
| 91 |
2/4✓ Branch 2 → 3 taken 436016 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 436016 times.
✗ Branch 3 → 8 not taken.
|
872032 | std::any visitCastExpr(SpiceParser::CastExprContext *ctx) override { return buildRule(ctx); } |
| 92 |
2/4✓ Branch 2 → 3 taken 466664 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 466664 times.
✗ Branch 3 → 8 not taken.
|
933328 | std::any visitPrefixUnaryExpr(SpiceParser::PrefixUnaryExprContext *ctx) override { return buildRule(ctx); } |
| 93 |
2/4✓ Branch 2 → 3 taken 588857 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 588857 times.
✗ Branch 3 → 8 not taken.
|
1177714 | std::any visitPostfixUnaryExpr(SpiceParser::PostfixUnaryExprContext *ctx) override { return buildRule(ctx); } |
| 94 |
2/4✓ Branch 2 → 3 taken 459235 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 459235 times.
✗ Branch 3 → 8 not taken.
|
918470 | std::any visitAtomicExpr(SpiceParser::AtomicExprContext *ctx) override { return buildRule(ctx); } |
| 95 |
2/4✓ Branch 2 → 3 taken 98125 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 98125 times.
✗ Branch 3 → 8 not taken.
|
196250 | std::any visitValue(SpiceParser::ValueContext *ctx) override { return buildRule(ctx); } |
| 96 |
2/4✓ Branch 2 → 3 taken 86095 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 86095 times.
✗ Branch 3 → 8 not taken.
|
172190 | std::any visitFctCall(SpiceParser::FctCallContext *ctx) override { return buildRule(ctx); } |
| 97 |
2/4✓ Branch 2 → 3 taken 28 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 28 times.
✗ Branch 3 → 8 not taken.
|
56 | std::any visitArrayInitialization(SpiceParser::ArrayInitializationContext *ctx) override { return buildRule(ctx); } |
| 98 |
2/4✓ Branch 2 → 3 taken 1530 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 1530 times.
✗ Branch 3 → 8 not taken.
|
3060 | 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 8 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 8 times.
✗ Branch 3 → 8 not taken.
|
16 | 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 83640 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 83640 times.
✗ Branch 3 → 8 not taken.
|
167280 | std::any visitConstant(SpiceParser::ConstantContext *ctx) override { return buildRule(ctx); } |
| 103 |
2/4✓ Branch 2 → 3 taken 236126 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 236126 times.
✗ Branch 3 → 8 not taken.
|
472252 | std::any visitDataType(SpiceParser::DataTypeContext *ctx) override { return buildRule(ctx); } |
| 104 |
2/4✓ Branch 2 → 3 taken 236126 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 236126 times.
✗ Branch 3 → 8 not taken.
|
472252 | std::any visitBaseDataType(SpiceParser::BaseDataTypeContext *ctx) override { return buildRule(ctx); } |
| 105 |
2/4✓ Branch 2 → 3 taken 87061 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 87061 times.
✗ Branch 3 → 8 not taken.
|
174122 | std::any visitCustomDataType(SpiceParser::CustomDataTypeContext *ctx) override { return buildRule(ctx); } |
| 106 |
2/4✓ Branch 2 → 3 taken 638 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 638 times.
✗ Branch 3 → 8 not taken.
|
1276 | std::any visitFunctionDataType(SpiceParser::FunctionDataTypeContext *ctx) override { return buildRule(ctx); } |
| 107 |
2/4✓ Branch 2 → 3 taken 38068 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 38068 times.
✗ Branch 3 → 8 not taken.
|
76136 | std::any visitAssignOp(SpiceParser::AssignOpContext *ctx) override { return buildRule(ctx); } |
| 108 |
2/4✓ Branch 2 → 3 taken 6998 times.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 6998 times.
✗ Branch 3 → 8 not taken.
|
13996 | 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 |