Line | Branch | Exec | Source |
---|---|---|---|
1 | // Copyright (c) 2021-2024 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 | 521 | CSTVisualizer(GlobalResourceManager &resourceManager, SourceFile *sourceFile, const SpiceLexer *lexer, | |
22 | const SpiceParser *parser) | ||
23 |
3/6✓ Branch 3 taken 521 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 521 times.
✗ Branch 7 not taken.
✓ Branch 9 taken 521 times.
✗ Branch 10 not taken.
|
521 | : CompilerPass(resourceManager, sourceFile), vocabulary(lexer->getVocabulary()), ruleNames(parser->getRuleNames()){}; |
24 | |||
25 | // Visitor methods | ||
26 |
2/4✓ Branch 1 taken 521 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 521 times.
✗ Branch 5 not taken.
|
521 | std::any visitEntry(SpiceParser::EntryContext *ctx) override { return buildRule(ctx); } |
27 |
2/4✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 8 times.
✗ Branch 5 not taken.
|
8 | std::any visitMainFunctionDef(SpiceParser::MainFunctionDefContext *ctx) override { return buildRule(ctx); } |
28 |
2/4✓ Branch 1 taken 4140 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 4140 times.
✗ Branch 5 not taken.
|
4140 | std::any visitFunctionDef(SpiceParser::FunctionDefContext *ctx) override { return buildRule(ctx); } |
29 |
2/4✓ Branch 1 taken 2617 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2617 times.
✗ Branch 5 not taken.
|
2617 | std::any visitProcedureDef(SpiceParser::ProcedureDefContext *ctx) override { return buildRule(ctx); } |
30 |
2/4✓ Branch 1 taken 6757 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 6757 times.
✗ Branch 5 not taken.
|
6757 | std::any visitFctName(SpiceParser::FctNameContext *ctx) override { return buildRule(ctx); } |
31 |
2/4✓ Branch 1 taken 688 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 688 times.
✗ Branch 5 not taken.
|
688 | std::any visitGenericTypeDef(SpiceParser::GenericTypeDefContext *ctx) override { return buildRule(ctx); } |
32 |
2/4✓ Branch 1 taken 26 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 26 times.
✗ Branch 5 not taken.
|
26 | std::any visitAliasDef(SpiceParser::AliasDefContext *ctx) override { return buildRule(ctx); } |
33 |
2/4✓ Branch 1 taken 429 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 429 times.
✗ Branch 5 not taken.
|
429 | std::any visitStructDef(SpiceParser::StructDefContext *ctx) override { return buildRule(ctx); } |
34 |
2/4✓ Branch 1 taken 61 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 61 times.
✗ Branch 5 not taken.
|
61 | std::any visitInterfaceDef(SpiceParser::InterfaceDefContext *ctx) override { return buildRule(ctx); } |
35 |
2/4✓ Branch 1 taken 32 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 32 times.
✗ Branch 5 not taken.
|
32 | std::any visitEnumDef(SpiceParser::EnumDefContext *ctx) override { return buildRule(ctx); } |
36 |
2/4✓ Branch 1 taken 715 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 715 times.
✗ Branch 5 not taken.
|
715 | std::any visitGlobalVarDef(SpiceParser::GlobalVarDefContext *ctx) override { return buildRule(ctx); } |
37 |
2/4✓ Branch 1 taken 692 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 692 times.
✗ Branch 5 not taken.
|
692 | std::any visitExtDecl(SpiceParser::ExtDeclContext *ctx) override { return buildRule(ctx); } |
38 |
2/4✓ Branch 1 taken 254 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 254 times.
✗ Branch 5 not taken.
|
254 | std::any visitImportDef(SpiceParser::ImportDefContext *ctx) override { return buildRule(ctx); } |
39 |
2/4✓ Branch 1 taken 1802 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1802 times.
✗ Branch 5 not taken.
|
1802 | std::any visitUnsafeBlock(SpiceParser::UnsafeBlockContext *ctx) override { return buildRule(ctx); } |
40 |
2/4✓ Branch 1 taken 934 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 934 times.
✗ Branch 5 not taken.
|
934 | std::any visitForLoop(SpiceParser::ForLoopContext *ctx) override { return buildRule(ctx); } |
41 |
2/4✓ Branch 1 taken 934 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 934 times.
✗ Branch 5 not taken.
|
934 | std::any visitForHead(SpiceParser::ForHeadContext *ctx) override { return buildRule(ctx); } |
42 |
2/4✓ Branch 1 taken 49 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 49 times.
✗ Branch 5 not taken.
|
49 | std::any visitForeachLoop(SpiceParser::ForeachLoopContext *ctx) override { return buildRule(ctx); } |
43 |
2/4✓ Branch 1 taken 49 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 49 times.
✗ Branch 5 not taken.
|
49 | std::any visitForeachHead(SpiceParser::ForeachHeadContext *ctx) override { return buildRule(ctx); } |
44 |
2/4✓ Branch 1 taken 382 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 382 times.
✗ Branch 5 not taken.
|
382 | std::any visitWhileLoop(SpiceParser::WhileLoopContext *ctx) override { return buildRule(ctx); } |
45 |
2/4✓ Branch 1 taken 3 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 3 times.
✗ Branch 5 not taken.
|
3 | std::any visitDoWhileLoop(SpiceParser::DoWhileLoopContext *ctx) override { return buildRule(ctx); } |
46 |
2/4✓ Branch 1 taken 2852 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2852 times.
✗ Branch 5 not taken.
|
2852 | std::any visitIfStmt(SpiceParser::IfStmtContext *ctx) override { return buildRule(ctx); } |
47 |
2/4✓ Branch 1 taken 157 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 157 times.
✗ Branch 5 not taken.
|
157 | std::any visitElseStmt(SpiceParser::ElseStmtContext *ctx) override { return buildRule(ctx); } |
48 |
2/4✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
|
1 | std::any visitSwitchStmt(SpiceParser::SwitchStmtContext *ctx) override { return buildRule(ctx); } |
49 |
2/4✓ Branch 1 taken 6 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 6 times.
✗ Branch 5 not taken.
|
6 | std::any visitCaseBranch(SpiceParser::CaseBranchContext *ctx) override { return buildRule(ctx); } |
50 | ✗ | std::any visitDefaultBranch(SpiceParser::DefaultBranchContext *ctx) override { return buildRule(ctx); } | |
51 |
2/4✓ Branch 1 taken 66 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 66 times.
✗ Branch 5 not taken.
|
66 | std::any visitAssertStmt(SpiceParser::AssertStmtContext *ctx) override { return buildRule(ctx); } |
52 | ✗ | std::any visitAnonymousBlockStmt(SpiceParser::AnonymousBlockStmtContext *ctx) override { return buildRule(ctx); } | |
53 |
2/4✓ Branch 1 taken 12907 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 12907 times.
✗ Branch 5 not taken.
|
12907 | std::any visitStmtLst(SpiceParser::StmtLstContext *ctx) override { return buildRule(ctx); } |
54 |
2/4✓ Branch 1 taken 986 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 986 times.
✗ Branch 5 not taken.
|
986 | std::any visitField(SpiceParser::FieldContext *ctx) override { return buildRule(ctx); } |
55 |
2/4✓ Branch 1 taken 158 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 158 times.
✗ Branch 5 not taken.
|
158 | std::any visitSignature(SpiceParser::SignatureContext *ctx) override { return buildRule(ctx); } |
56 |
2/4✓ Branch 1 taken 4209 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 4209 times.
✗ Branch 5 not taken.
|
4209 | std::any visitTypeLst(SpiceParser::TypeLstContext *ctx) override { return buildRule(ctx); } |
57 |
2/4✓ Branch 1 taken 688 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 688 times.
✗ Branch 5 not taken.
|
688 | std::any visitTypeAltsLst(SpiceParser::TypeAltsLstContext *ctx) override { return buildRule(ctx); } |
58 |
2/4✓ Branch 1 taken 4817 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 4817 times.
✗ Branch 5 not taken.
|
4817 | std::any visitParamLst(SpiceParser::ParamLstContext *ctx) override { return buildRule(ctx); } |
59 |
2/4✓ Branch 1 taken 6646 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 6646 times.
✗ Branch 5 not taken.
|
6646 | std::any visitArgLst(SpiceParser::ArgLstContext *ctx) override { return buildRule(ctx); } |
60 |
2/4✓ Branch 1 taken 32 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 32 times.
✗ Branch 5 not taken.
|
32 | std::any visitEnumItemLst(SpiceParser::EnumItemLstContext *ctx) override { return buildRule(ctx); } |
61 |
2/4✓ Branch 1 taken 408 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 408 times.
✗ Branch 5 not taken.
|
408 | std::any visitEnumItem(SpiceParser::EnumItemContext *ctx) override { return buildRule(ctx); } |
62 |
2/4✓ Branch 1 taken 17615 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 17615 times.
✗ Branch 5 not taken.
|
17615 | std::any visitStmt(SpiceParser::StmtContext *ctx) override { return buildRule(ctx); } |
63 |
2/4✓ Branch 1 taken 11853 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 11853 times.
✗ Branch 5 not taken.
|
11853 | std::any visitDeclStmt(SpiceParser::DeclStmtContext *ctx) override { return buildRule(ctx); } |
64 |
2/4✓ Branch 1 taken 19534 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 19534 times.
✗ Branch 5 not taken.
|
19534 | std::any visitSpecifierLst(SpiceParser::SpecifierLstContext *ctx) override { return buildRule(ctx); } |
65 |
2/4✓ Branch 1 taken 22874 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 22874 times.
✗ Branch 5 not taken.
|
22874 | std::any visitSpecifier(SpiceParser::SpecifierContext *ctx) override { return buildRule(ctx); } |
66 |
2/4✓ Branch 1 taken 275 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 275 times.
✗ Branch 5 not taken.
|
275 | std::any visitModAttr(SpiceParser::ModAttrContext *ctx) override { return buildRule(ctx); } |
67 |
2/4✓ Branch 1 taken 104 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 104 times.
✗ Branch 5 not taken.
|
104 | std::any visitTopLevelDefAttr(SpiceParser::TopLevelDefAttrContext *ctx) override { return buildRule(ctx); } |
68 |
2/4✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
|
1 | std::any visitLambdaAttr(SpiceParser::LambdaAttrContext *ctx) override { return buildRule(ctx); } |
69 |
2/4✓ Branch 1 taken 380 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 380 times.
✗ Branch 5 not taken.
|
380 | std::any visitAttrLst(SpiceParser::AttrLstContext *ctx) override { return buildRule(ctx); } |
70 |
2/4✓ Branch 1 taken 591 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 591 times.
✗ Branch 5 not taken.
|
591 | std::any visitAttr(SpiceParser::AttrContext *ctx) override { return buildRule(ctx); } |
71 |
2/4✓ Branch 1 taken 6 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 6 times.
✗ Branch 5 not taken.
|
6 | std::any visitCaseConstant(SpiceParser::CaseConstantContext *ctx) override { return buildRule(ctx); } |
72 |
2/4✓ Branch 1 taken 5457 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 5457 times.
✗ Branch 5 not taken.
|
5457 | std::any visitReturnStmt(SpiceParser::ReturnStmtContext *ctx) override { return buildRule(ctx); } |
73 |
2/4✓ Branch 1 taken 92 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 92 times.
✗ Branch 5 not taken.
|
92 | std::any visitBreakStmt(SpiceParser::BreakStmtContext *ctx) override { return buildRule(ctx); } |
74 |
2/4✓ Branch 1 taken 164 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 164 times.
✗ Branch 5 not taken.
|
164 | std::any visitContinueStmt(SpiceParser::ContinueStmtContext *ctx) override { return buildRule(ctx); } |
75 | ✗ | std::any visitFallthroughStmt(SpiceParser::FallthroughStmtContext *ctx) override { return buildRule(ctx); } | |
76 |
2/4✓ Branch 1 taken 793 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 793 times.
✗ Branch 5 not taken.
|
793 | std::any visitBuiltinCall(SpiceParser::BuiltinCallContext *ctx) override { return buildRule(ctx); } |
77 |
2/4✓ Branch 1 taken 147 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 147 times.
✗ Branch 5 not taken.
|
147 | std::any visitPrintfCall(SpiceParser::PrintfCallContext *ctx) override { return buildRule(ctx); } |
78 |
2/4✓ Branch 1 taken 170 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 170 times.
✗ Branch 5 not taken.
|
170 | std::any visitSizeOfCall(SpiceParser::SizeOfCallContext *ctx) override { return buildRule(ctx); } |
79 | ✗ | std::any visitAlignOfCall(SpiceParser::AlignOfCallContext *ctx) override { return buildRule(ctx); } | |
80 |
2/4✓ Branch 1 taken 18 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 18 times.
✗ Branch 5 not taken.
|
18 | std::any visitLenCall(SpiceParser::LenCallContext *ctx) override { return buildRule(ctx); } |
81 |
2/4✓ Branch 1 taken 458 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 458 times.
✗ Branch 5 not taken.
|
458 | std::any visitPanicCall(SpiceParser::PanicCallContext *ctx) override { return buildRule(ctx); } |
82 | ✗ | std::any visitSysCall(SpiceParser::SysCallContext *ctx) override { return buildRule(ctx); } | |
83 |
2/4✓ Branch 1 taken 42357 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 42357 times.
✗ Branch 5 not taken.
|
42357 | std::any visitAssignExpr(SpiceParser::AssignExprContext *ctx) override { return buildRule(ctx); } |
84 |
2/4✓ Branch 1 taken 37248 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 37248 times.
✗ Branch 5 not taken.
|
37248 | std::any visitTernaryExpr(SpiceParser::TernaryExprContext *ctx) override { return buildRule(ctx); } |
85 |
2/4✓ Branch 1 taken 37730 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 37730 times.
✗ Branch 5 not taken.
|
37730 | std::any visitLogicalOrExpr(SpiceParser::LogicalOrExprContext *ctx) override { return buildRule(ctx); } |
86 |
2/4✓ Branch 1 taken 38046 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 38046 times.
✗ Branch 5 not taken.
|
38046 | std::any visitLogicalAndExpr(SpiceParser::LogicalAndExprContext *ctx) override { return buildRule(ctx); } |
87 |
2/4✓ Branch 1 taken 38140 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 38140 times.
✗ Branch 5 not taken.
|
38140 | std::any visitBitwiseOrExpr(SpiceParser::BitwiseOrExprContext *ctx) override { return buildRule(ctx); } |
88 |
2/4✓ Branch 1 taken 38167 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 38167 times.
✗ Branch 5 not taken.
|
38167 | std::any visitBitwiseXorExpr(SpiceParser::BitwiseXorExprContext *ctx) override { return buildRule(ctx); } |
89 |
2/4✓ Branch 1 taken 38167 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 38167 times.
✗ Branch 5 not taken.
|
38167 | std::any visitBitwiseAndExpr(SpiceParser::BitwiseAndExprContext *ctx) override { return buildRule(ctx); } |
90 |
2/4✓ Branch 1 taken 38187 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 38187 times.
✗ Branch 5 not taken.
|
38187 | std::any visitEqualityExpr(SpiceParser::EqualityExprContext *ctx) override { return buildRule(ctx); } |
91 |
2/4✓ Branch 1 taken 41293 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 41293 times.
✗ Branch 5 not taken.
|
41293 | std::any visitRelationalExpr(SpiceParser::RelationalExprContext *ctx) override { return buildRule(ctx); } |
92 |
2/4✓ Branch 1 taken 43764 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 43764 times.
✗ Branch 5 not taken.
|
43764 | std::any visitShiftExpr(SpiceParser::ShiftExprContext *ctx) override { return buildRule(ctx); } |
93 |
2/4✓ Branch 1 taken 43770 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 43770 times.
✗ Branch 5 not taken.
|
43770 | std::any visitAdditiveExpr(SpiceParser::AdditiveExprContext *ctx) override { return buildRule(ctx); } |
94 |
2/4✓ Branch 1 taken 46513 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 46513 times.
✗ Branch 5 not taken.
|
46513 | std::any visitMultiplicativeExpr(SpiceParser::MultiplicativeExprContext *ctx) override { return buildRule(ctx); } |
95 |
2/4✓ Branch 1 taken 47543 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 47543 times.
✗ Branch 5 not taken.
|
47543 | std::any visitCastExpr(SpiceParser::CastExprContext *ctx) override { return buildRule(ctx); } |
96 |
2/4✓ Branch 1 taken 53519 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 53519 times.
✗ Branch 5 not taken.
|
53519 | std::any visitPrefixUnaryExpr(SpiceParser::PrefixUnaryExprContext *ctx) override { return buildRule(ctx); } |
97 |
2/4✓ Branch 1 taken 69541 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 69541 times.
✗ Branch 5 not taken.
|
69541 | std::any visitPostfixUnaryExpr(SpiceParser::PostfixUnaryExprContext *ctx) override { return buildRule(ctx); } |
98 |
2/4✓ Branch 1 taken 52764 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 52764 times.
✗ Branch 5 not taken.
|
52764 | std::any visitAtomicExpr(SpiceParser::AtomicExprContext *ctx) override { return buildRule(ctx); } |
99 |
2/4✓ Branch 1 taken 9527 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 9527 times.
✗ Branch 5 not taken.
|
9527 | std::any visitValue(SpiceParser::ValueContext *ctx) override { return buildRule(ctx); } |
100 |
2/4✓ Branch 1 taken 8721 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 8721 times.
✗ Branch 5 not taken.
|
8721 | std::any visitFctCall(SpiceParser::FctCallContext *ctx) override { return buildRule(ctx); } |
101 |
2/4✓ Branch 1 taken 6 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 6 times.
✗ Branch 5 not taken.
|
6 | std::any visitArrayInitialization(SpiceParser::ArrayInitializationContext *ctx) override { return buildRule(ctx); } |
102 |
2/4✓ Branch 1 taken 83 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 83 times.
✗ Branch 5 not taken.
|
83 | std::any visitStructInstantiation(SpiceParser::StructInstantiationContext *ctx) override { return buildRule(ctx); } |
103 | ✗ | std::any visitLambdaFunc(SpiceParser::LambdaFuncContext *ctx) override { return buildRule(ctx); } | |
104 |
2/4✓ Branch 1 taken 2 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2 times.
✗ Branch 5 not taken.
|
2 | std::any visitLambdaProc(SpiceParser::LambdaProcContext *ctx) override { return buildRule(ctx); } |
105 | ✗ | std::any visitLambdaExpr(SpiceParser::LambdaExprContext *ctx) override { return buildRule(ctx); } | |
106 |
2/4✓ Branch 1 taken 9153 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 9153 times.
✗ Branch 5 not taken.
|
9153 | std::any visitConstant(SpiceParser::ConstantContext *ctx) override { return buildRule(ctx); } |
107 |
2/4✓ Branch 1 taken 28295 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 28295 times.
✗ Branch 5 not taken.
|
28295 | std::any visitDataType(SpiceParser::DataTypeContext *ctx) override { return buildRule(ctx); } |
108 |
2/4✓ Branch 1 taken 28295 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 28295 times.
✗ Branch 5 not taken.
|
28295 | std::any visitBaseDataType(SpiceParser::BaseDataTypeContext *ctx) override { return buildRule(ctx); } |
109 |
2/4✓ Branch 1 taken 10792 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 10792 times.
✗ Branch 5 not taken.
|
10792 | std::any visitCustomDataType(SpiceParser::CustomDataTypeContext *ctx) override { return buildRule(ctx); } |
110 |
2/4✓ Branch 1 taken 42 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 42 times.
✗ Branch 5 not taken.
|
42 | std::any visitFunctionDataType(SpiceParser::FunctionDataTypeContext *ctx) override { return buildRule(ctx); } |
111 |
2/4✓ Branch 1 taken 5221 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 5221 times.
✗ Branch 5 not taken.
|
5221 | std::any visitAssignOp(SpiceParser::AssignOpContext *ctx) override { return buildRule(ctx); } |
112 |
2/4✓ Branch 1 taken 1219 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1219 times.
✗ Branch 5 not taken.
|
1219 | std::any visitOverloadableOp(SpiceParser::OverloadableOpContext *ctx) override { return buildRule(ctx); } |
113 | |||
114 | private: | ||
115 | // Members | ||
116 | const antlr4::dfa::Vocabulary &vocabulary; | ||
117 | const std::vector<std::string> ruleNames; | ||
118 | int currentTabs = 1; | ||
119 | std::string parentNodeId; | ||
120 | |||
121 | // Private methods | ||
122 | std::string buildRule(antlr4::ParserRuleContext *ctx); | ||
123 | [[nodiscard]] std::string getSpaces() const; | ||
124 | [[nodiscard]] static std::string tokenToCodeLoc(const antlr4::Token &token); | ||
125 | }; | ||
126 | |||
127 | } // namespace spice::compiler | ||
128 |