c-next 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/README.md +726 -0
  2. package/bin/cnext.js +5 -0
  3. package/grammar/C.g4 +1112 -0
  4. package/grammar/CNext.g4 +817 -0
  5. package/grammar/CPP14Lexer.g4 +282 -0
  6. package/grammar/CPP14Parser.g4 +1072 -0
  7. package/package.json +85 -0
  8. package/src/analysis/DivisionByZeroAnalyzer.ts +378 -0
  9. package/src/analysis/FunctionCallAnalyzer.ts +526 -0
  10. package/src/analysis/InitializationAnalyzer.ts +725 -0
  11. package/src/analysis/NullCheckAnalyzer.ts +427 -0
  12. package/src/analysis/types/IDivisionByZeroError.ts +25 -0
  13. package/src/analysis/types/IFunctionCallError.ts +17 -0
  14. package/src/analysis/types/IInitializationError.ts +55 -0
  15. package/src/analysis/types/INullCheckError.ts +25 -0
  16. package/src/codegen/CodeGenerator.ts +7945 -0
  17. package/src/codegen/CommentExtractor.ts +240 -0
  18. package/src/codegen/CommentFormatter.ts +155 -0
  19. package/src/codegen/HeaderGenerator.ts +265 -0
  20. package/src/codegen/TypeResolver.ts +365 -0
  21. package/src/codegen/types/ECommentType.ts +10 -0
  22. package/src/codegen/types/IComment.ts +21 -0
  23. package/src/codegen/types/ICommentError.ts +15 -0
  24. package/src/codegen/types/TOverflowBehavior.ts +6 -0
  25. package/src/codegen/types/TParameterInfo.ts +13 -0
  26. package/src/codegen/types/TTypeConstants.ts +94 -0
  27. package/src/codegen/types/TTypeInfo.ts +22 -0
  28. package/src/index.ts +518 -0
  29. package/src/lib/IncludeDiscovery.ts +131 -0
  30. package/src/lib/InputExpansion.ts +121 -0
  31. package/src/lib/PlatformIODetector.ts +162 -0
  32. package/src/lib/transpiler.ts +439 -0
  33. package/src/lib/types/ITranspileResult.ts +80 -0
  34. package/src/parser/c/grammar/C.interp +338 -0
  35. package/src/parser/c/grammar/C.tokens +229 -0
  36. package/src/parser/c/grammar/CLexer.interp +415 -0
  37. package/src/parser/c/grammar/CLexer.tokens +229 -0
  38. package/src/parser/c/grammar/CLexer.ts +750 -0
  39. package/src/parser/c/grammar/CListener.ts +976 -0
  40. package/src/parser/c/grammar/CParser.ts +9663 -0
  41. package/src/parser/c/grammar/CVisitor.ts +626 -0
  42. package/src/parser/cpp/grammar/CPP14Lexer.interp +478 -0
  43. package/src/parser/cpp/grammar/CPP14Lexer.tokens +264 -0
  44. package/src/parser/cpp/grammar/CPP14Lexer.ts +848 -0
  45. package/src/parser/cpp/grammar/CPP14Parser.interp +492 -0
  46. package/src/parser/cpp/grammar/CPP14Parser.tokens +264 -0
  47. package/src/parser/cpp/grammar/CPP14Parser.ts +19961 -0
  48. package/src/parser/cpp/grammar/CPP14ParserListener.ts +2120 -0
  49. package/src/parser/cpp/grammar/CPP14ParserVisitor.ts +1354 -0
  50. package/src/parser/grammar/CNext.interp +340 -0
  51. package/src/parser/grammar/CNext.tokens +214 -0
  52. package/src/parser/grammar/CNextLexer.interp +374 -0
  53. package/src/parser/grammar/CNextLexer.tokens +214 -0
  54. package/src/parser/grammar/CNextLexer.ts +668 -0
  55. package/src/parser/grammar/CNextListener.ts +1020 -0
  56. package/src/parser/grammar/CNextParser.ts +9239 -0
  57. package/src/parser/grammar/CNextVisitor.ts +654 -0
  58. package/src/preprocessor/Preprocessor.ts +301 -0
  59. package/src/preprocessor/ToolchainDetector.ts +225 -0
  60. package/src/preprocessor/types/IPreprocessResult.ts +39 -0
  61. package/src/preprocessor/types/IToolchain.ts +27 -0
  62. package/src/project/FileDiscovery.ts +236 -0
  63. package/src/project/Project.ts +425 -0
  64. package/src/project/types/IProjectConfig.ts +64 -0
  65. package/src/symbols/CNextSymbolCollector.ts +326 -0
  66. package/src/symbols/CSymbolCollector.ts +457 -0
  67. package/src/symbols/CppSymbolCollector.ts +362 -0
  68. package/src/symbols/SymbolTable.ts +312 -0
  69. package/src/symbols/types/IConflict.ts +20 -0
  70. package/src/types/ESourceLanguage.ts +10 -0
  71. package/src/types/ESymbolKind.ts +20 -0
  72. package/src/types/ISymbol.ts +45 -0
@@ -0,0 +1,654 @@
1
+ // Generated from grammar/CNext.g4 by ANTLR 4.13.1
2
+
3
+ import { AbstractParseTreeVisitor } from "antlr4ng";
4
+
5
+
6
+ import { ProgramContext } from "./CNextParser.js";
7
+ import { IncludeDirectiveContext } from "./CNextParser.js";
8
+ import { PreprocessorDirectiveContext } from "./CNextParser.js";
9
+ import { DefineDirectiveContext } from "./CNextParser.js";
10
+ import { ConditionalDirectiveContext } from "./CNextParser.js";
11
+ import { PragmaDirectiveContext } from "./CNextParser.js";
12
+ import { DeclarationContext } from "./CNextParser.js";
13
+ import { ScopeDeclarationContext } from "./CNextParser.js";
14
+ import { ScopeMemberContext } from "./CNextParser.js";
15
+ import { VisibilityModifierContext } from "./CNextParser.js";
16
+ import { RegisterDeclarationContext } from "./CNextParser.js";
17
+ import { RegisterMemberContext } from "./CNextParser.js";
18
+ import { AccessModifierContext } from "./CNextParser.js";
19
+ import { StructDeclarationContext } from "./CNextParser.js";
20
+ import { StructMemberContext } from "./CNextParser.js";
21
+ import { EnumDeclarationContext } from "./CNextParser.js";
22
+ import { EnumMemberContext } from "./CNextParser.js";
23
+ import { BitmapDeclarationContext } from "./CNextParser.js";
24
+ import { BitmapTypeContext } from "./CNextParser.js";
25
+ import { BitmapMemberContext } from "./CNextParser.js";
26
+ import { FunctionDeclarationContext } from "./CNextParser.js";
27
+ import { ParameterListContext } from "./CNextParser.js";
28
+ import { ParameterContext } from "./CNextParser.js";
29
+ import { ConstModifierContext } from "./CNextParser.js";
30
+ import { VolatileModifierContext } from "./CNextParser.js";
31
+ import { OverflowModifierContext } from "./CNextParser.js";
32
+ import { AtomicModifierContext } from "./CNextParser.js";
33
+ import { ArrayDimensionContext } from "./CNextParser.js";
34
+ import { VariableDeclarationContext } from "./CNextParser.js";
35
+ import { BlockContext } from "./CNextParser.js";
36
+ import { StatementContext } from "./CNextParser.js";
37
+ import { CriticalStatementContext } from "./CNextParser.js";
38
+ import { AssignmentStatementContext } from "./CNextParser.js";
39
+ import { AssignmentOperatorContext } from "./CNextParser.js";
40
+ import { AssignmentTargetContext } from "./CNextParser.js";
41
+ import { ThisAccessContext } from "./CNextParser.js";
42
+ import { ThisMemberAccessContext } from "./CNextParser.js";
43
+ import { ThisArrayAccessContext } from "./CNextParser.js";
44
+ import { GlobalAccessContext } from "./CNextParser.js";
45
+ import { GlobalMemberAccessContext } from "./CNextParser.js";
46
+ import { GlobalArrayAccessContext } from "./CNextParser.js";
47
+ import { ExpressionStatementContext } from "./CNextParser.js";
48
+ import { IfStatementContext } from "./CNextParser.js";
49
+ import { WhileStatementContext } from "./CNextParser.js";
50
+ import { DoWhileStatementContext } from "./CNextParser.js";
51
+ import { ForStatementContext } from "./CNextParser.js";
52
+ import { ForInitContext } from "./CNextParser.js";
53
+ import { ForVarDeclContext } from "./CNextParser.js";
54
+ import { ForAssignmentContext } from "./CNextParser.js";
55
+ import { ForUpdateContext } from "./CNextParser.js";
56
+ import { ReturnStatementContext } from "./CNextParser.js";
57
+ import { SwitchStatementContext } from "./CNextParser.js";
58
+ import { SwitchCaseContext } from "./CNextParser.js";
59
+ import { CaseLabelContext } from "./CNextParser.js";
60
+ import { DefaultCaseContext } from "./CNextParser.js";
61
+ import { ExpressionContext } from "./CNextParser.js";
62
+ import { TernaryExpressionContext } from "./CNextParser.js";
63
+ import { OrExpressionContext } from "./CNextParser.js";
64
+ import { AndExpressionContext } from "./CNextParser.js";
65
+ import { EqualityExpressionContext } from "./CNextParser.js";
66
+ import { RelationalExpressionContext } from "./CNextParser.js";
67
+ import { BitwiseOrExpressionContext } from "./CNextParser.js";
68
+ import { BitwiseXorExpressionContext } from "./CNextParser.js";
69
+ import { BitwiseAndExpressionContext } from "./CNextParser.js";
70
+ import { ShiftExpressionContext } from "./CNextParser.js";
71
+ import { AdditiveExpressionContext } from "./CNextParser.js";
72
+ import { MultiplicativeExpressionContext } from "./CNextParser.js";
73
+ import { UnaryExpressionContext } from "./CNextParser.js";
74
+ import { PostfixExpressionContext } from "./CNextParser.js";
75
+ import { PostfixOpContext } from "./CNextParser.js";
76
+ import { PrimaryExpressionContext } from "./CNextParser.js";
77
+ import { SizeofExpressionContext } from "./CNextParser.js";
78
+ import { CastExpressionContext } from "./CNextParser.js";
79
+ import { StructInitializerContext } from "./CNextParser.js";
80
+ import { FieldInitializerListContext } from "./CNextParser.js";
81
+ import { FieldInitializerContext } from "./CNextParser.js";
82
+ import { ArrayInitializerContext } from "./CNextParser.js";
83
+ import { ArrayInitializerElementContext } from "./CNextParser.js";
84
+ import { MemberAccessContext } from "./CNextParser.js";
85
+ import { ArrayAccessContext } from "./CNextParser.js";
86
+ import { ArgumentListContext } from "./CNextParser.js";
87
+ import { TypeContext } from "./CNextParser.js";
88
+ import { ScopedTypeContext } from "./CNextParser.js";
89
+ import { QualifiedTypeContext } from "./CNextParser.js";
90
+ import { PrimitiveTypeContext } from "./CNextParser.js";
91
+ import { UserTypeContext } from "./CNextParser.js";
92
+ import { StringTypeContext } from "./CNextParser.js";
93
+ import { ArrayTypeContext } from "./CNextParser.js";
94
+ import { GenericTypeContext } from "./CNextParser.js";
95
+ import { TypeArgumentContext } from "./CNextParser.js";
96
+ import { LiteralContext } from "./CNextParser.js";
97
+
98
+
99
+ /**
100
+ * This interface defines a complete generic visitor for a parse tree produced
101
+ * by `CNextParser`.
102
+ *
103
+ * @param <Result> The return type of the visit operation. Use `void` for
104
+ * operations with no return type.
105
+ */
106
+ export class CNextVisitor<Result> extends AbstractParseTreeVisitor<Result> {
107
+ /**
108
+ * Visit a parse tree produced by `CNextParser.program`.
109
+ * @param ctx the parse tree
110
+ * @return the visitor result
111
+ */
112
+ visitProgram?: (ctx: ProgramContext) => Result;
113
+ /**
114
+ * Visit a parse tree produced by `CNextParser.includeDirective`.
115
+ * @param ctx the parse tree
116
+ * @return the visitor result
117
+ */
118
+ visitIncludeDirective?: (ctx: IncludeDirectiveContext) => Result;
119
+ /**
120
+ * Visit a parse tree produced by `CNextParser.preprocessorDirective`.
121
+ * @param ctx the parse tree
122
+ * @return the visitor result
123
+ */
124
+ visitPreprocessorDirective?: (ctx: PreprocessorDirectiveContext) => Result;
125
+ /**
126
+ * Visit a parse tree produced by `CNextParser.defineDirective`.
127
+ * @param ctx the parse tree
128
+ * @return the visitor result
129
+ */
130
+ visitDefineDirective?: (ctx: DefineDirectiveContext) => Result;
131
+ /**
132
+ * Visit a parse tree produced by `CNextParser.conditionalDirective`.
133
+ * @param ctx the parse tree
134
+ * @return the visitor result
135
+ */
136
+ visitConditionalDirective?: (ctx: ConditionalDirectiveContext) => Result;
137
+ /**
138
+ * Visit a parse tree produced by `CNextParser.pragmaDirective`.
139
+ * @param ctx the parse tree
140
+ * @return the visitor result
141
+ */
142
+ visitPragmaDirective?: (ctx: PragmaDirectiveContext) => Result;
143
+ /**
144
+ * Visit a parse tree produced by `CNextParser.declaration`.
145
+ * @param ctx the parse tree
146
+ * @return the visitor result
147
+ */
148
+ visitDeclaration?: (ctx: DeclarationContext) => Result;
149
+ /**
150
+ * Visit a parse tree produced by `CNextParser.scopeDeclaration`.
151
+ * @param ctx the parse tree
152
+ * @return the visitor result
153
+ */
154
+ visitScopeDeclaration?: (ctx: ScopeDeclarationContext) => Result;
155
+ /**
156
+ * Visit a parse tree produced by `CNextParser.scopeMember`.
157
+ * @param ctx the parse tree
158
+ * @return the visitor result
159
+ */
160
+ visitScopeMember?: (ctx: ScopeMemberContext) => Result;
161
+ /**
162
+ * Visit a parse tree produced by `CNextParser.visibilityModifier`.
163
+ * @param ctx the parse tree
164
+ * @return the visitor result
165
+ */
166
+ visitVisibilityModifier?: (ctx: VisibilityModifierContext) => Result;
167
+ /**
168
+ * Visit a parse tree produced by `CNextParser.registerDeclaration`.
169
+ * @param ctx the parse tree
170
+ * @return the visitor result
171
+ */
172
+ visitRegisterDeclaration?: (ctx: RegisterDeclarationContext) => Result;
173
+ /**
174
+ * Visit a parse tree produced by `CNextParser.registerMember`.
175
+ * @param ctx the parse tree
176
+ * @return the visitor result
177
+ */
178
+ visitRegisterMember?: (ctx: RegisterMemberContext) => Result;
179
+ /**
180
+ * Visit a parse tree produced by `CNextParser.accessModifier`.
181
+ * @param ctx the parse tree
182
+ * @return the visitor result
183
+ */
184
+ visitAccessModifier?: (ctx: AccessModifierContext) => Result;
185
+ /**
186
+ * Visit a parse tree produced by `CNextParser.structDeclaration`.
187
+ * @param ctx the parse tree
188
+ * @return the visitor result
189
+ */
190
+ visitStructDeclaration?: (ctx: StructDeclarationContext) => Result;
191
+ /**
192
+ * Visit a parse tree produced by `CNextParser.structMember`.
193
+ * @param ctx the parse tree
194
+ * @return the visitor result
195
+ */
196
+ visitStructMember?: (ctx: StructMemberContext) => Result;
197
+ /**
198
+ * Visit a parse tree produced by `CNextParser.enumDeclaration`.
199
+ * @param ctx the parse tree
200
+ * @return the visitor result
201
+ */
202
+ visitEnumDeclaration?: (ctx: EnumDeclarationContext) => Result;
203
+ /**
204
+ * Visit a parse tree produced by `CNextParser.enumMember`.
205
+ * @param ctx the parse tree
206
+ * @return the visitor result
207
+ */
208
+ visitEnumMember?: (ctx: EnumMemberContext) => Result;
209
+ /**
210
+ * Visit a parse tree produced by `CNextParser.bitmapDeclaration`.
211
+ * @param ctx the parse tree
212
+ * @return the visitor result
213
+ */
214
+ visitBitmapDeclaration?: (ctx: BitmapDeclarationContext) => Result;
215
+ /**
216
+ * Visit a parse tree produced by `CNextParser.bitmapType`.
217
+ * @param ctx the parse tree
218
+ * @return the visitor result
219
+ */
220
+ visitBitmapType?: (ctx: BitmapTypeContext) => Result;
221
+ /**
222
+ * Visit a parse tree produced by `CNextParser.bitmapMember`.
223
+ * @param ctx the parse tree
224
+ * @return the visitor result
225
+ */
226
+ visitBitmapMember?: (ctx: BitmapMemberContext) => Result;
227
+ /**
228
+ * Visit a parse tree produced by `CNextParser.functionDeclaration`.
229
+ * @param ctx the parse tree
230
+ * @return the visitor result
231
+ */
232
+ visitFunctionDeclaration?: (ctx: FunctionDeclarationContext) => Result;
233
+ /**
234
+ * Visit a parse tree produced by `CNextParser.parameterList`.
235
+ * @param ctx the parse tree
236
+ * @return the visitor result
237
+ */
238
+ visitParameterList?: (ctx: ParameterListContext) => Result;
239
+ /**
240
+ * Visit a parse tree produced by `CNextParser.parameter`.
241
+ * @param ctx the parse tree
242
+ * @return the visitor result
243
+ */
244
+ visitParameter?: (ctx: ParameterContext) => Result;
245
+ /**
246
+ * Visit a parse tree produced by `CNextParser.constModifier`.
247
+ * @param ctx the parse tree
248
+ * @return the visitor result
249
+ */
250
+ visitConstModifier?: (ctx: ConstModifierContext) => Result;
251
+ /**
252
+ * Visit a parse tree produced by `CNextParser.volatileModifier`.
253
+ * @param ctx the parse tree
254
+ * @return the visitor result
255
+ */
256
+ visitVolatileModifier?: (ctx: VolatileModifierContext) => Result;
257
+ /**
258
+ * Visit a parse tree produced by `CNextParser.overflowModifier`.
259
+ * @param ctx the parse tree
260
+ * @return the visitor result
261
+ */
262
+ visitOverflowModifier?: (ctx: OverflowModifierContext) => Result;
263
+ /**
264
+ * Visit a parse tree produced by `CNextParser.atomicModifier`.
265
+ * @param ctx the parse tree
266
+ * @return the visitor result
267
+ */
268
+ visitAtomicModifier?: (ctx: AtomicModifierContext) => Result;
269
+ /**
270
+ * Visit a parse tree produced by `CNextParser.arrayDimension`.
271
+ * @param ctx the parse tree
272
+ * @return the visitor result
273
+ */
274
+ visitArrayDimension?: (ctx: ArrayDimensionContext) => Result;
275
+ /**
276
+ * Visit a parse tree produced by `CNextParser.variableDeclaration`.
277
+ * @param ctx the parse tree
278
+ * @return the visitor result
279
+ */
280
+ visitVariableDeclaration?: (ctx: VariableDeclarationContext) => Result;
281
+ /**
282
+ * Visit a parse tree produced by `CNextParser.block`.
283
+ * @param ctx the parse tree
284
+ * @return the visitor result
285
+ */
286
+ visitBlock?: (ctx: BlockContext) => Result;
287
+ /**
288
+ * Visit a parse tree produced by `CNextParser.statement`.
289
+ * @param ctx the parse tree
290
+ * @return the visitor result
291
+ */
292
+ visitStatement?: (ctx: StatementContext) => Result;
293
+ /**
294
+ * Visit a parse tree produced by `CNextParser.criticalStatement`.
295
+ * @param ctx the parse tree
296
+ * @return the visitor result
297
+ */
298
+ visitCriticalStatement?: (ctx: CriticalStatementContext) => Result;
299
+ /**
300
+ * Visit a parse tree produced by `CNextParser.assignmentStatement`.
301
+ * @param ctx the parse tree
302
+ * @return the visitor result
303
+ */
304
+ visitAssignmentStatement?: (ctx: AssignmentStatementContext) => Result;
305
+ /**
306
+ * Visit a parse tree produced by `CNextParser.assignmentOperator`.
307
+ * @param ctx the parse tree
308
+ * @return the visitor result
309
+ */
310
+ visitAssignmentOperator?: (ctx: AssignmentOperatorContext) => Result;
311
+ /**
312
+ * Visit a parse tree produced by `CNextParser.assignmentTarget`.
313
+ * @param ctx the parse tree
314
+ * @return the visitor result
315
+ */
316
+ visitAssignmentTarget?: (ctx: AssignmentTargetContext) => Result;
317
+ /**
318
+ * Visit a parse tree produced by `CNextParser.thisAccess`.
319
+ * @param ctx the parse tree
320
+ * @return the visitor result
321
+ */
322
+ visitThisAccess?: (ctx: ThisAccessContext) => Result;
323
+ /**
324
+ * Visit a parse tree produced by `CNextParser.thisMemberAccess`.
325
+ * @param ctx the parse tree
326
+ * @return the visitor result
327
+ */
328
+ visitThisMemberAccess?: (ctx: ThisMemberAccessContext) => Result;
329
+ /**
330
+ * Visit a parse tree produced by `CNextParser.thisArrayAccess`.
331
+ * @param ctx the parse tree
332
+ * @return the visitor result
333
+ */
334
+ visitThisArrayAccess?: (ctx: ThisArrayAccessContext) => Result;
335
+ /**
336
+ * Visit a parse tree produced by `CNextParser.globalAccess`.
337
+ * @param ctx the parse tree
338
+ * @return the visitor result
339
+ */
340
+ visitGlobalAccess?: (ctx: GlobalAccessContext) => Result;
341
+ /**
342
+ * Visit a parse tree produced by `CNextParser.globalMemberAccess`.
343
+ * @param ctx the parse tree
344
+ * @return the visitor result
345
+ */
346
+ visitGlobalMemberAccess?: (ctx: GlobalMemberAccessContext) => Result;
347
+ /**
348
+ * Visit a parse tree produced by `CNextParser.globalArrayAccess`.
349
+ * @param ctx the parse tree
350
+ * @return the visitor result
351
+ */
352
+ visitGlobalArrayAccess?: (ctx: GlobalArrayAccessContext) => Result;
353
+ /**
354
+ * Visit a parse tree produced by `CNextParser.expressionStatement`.
355
+ * @param ctx the parse tree
356
+ * @return the visitor result
357
+ */
358
+ visitExpressionStatement?: (ctx: ExpressionStatementContext) => Result;
359
+ /**
360
+ * Visit a parse tree produced by `CNextParser.ifStatement`.
361
+ * @param ctx the parse tree
362
+ * @return the visitor result
363
+ */
364
+ visitIfStatement?: (ctx: IfStatementContext) => Result;
365
+ /**
366
+ * Visit a parse tree produced by `CNextParser.whileStatement`.
367
+ * @param ctx the parse tree
368
+ * @return the visitor result
369
+ */
370
+ visitWhileStatement?: (ctx: WhileStatementContext) => Result;
371
+ /**
372
+ * Visit a parse tree produced by `CNextParser.doWhileStatement`.
373
+ * @param ctx the parse tree
374
+ * @return the visitor result
375
+ */
376
+ visitDoWhileStatement?: (ctx: DoWhileStatementContext) => Result;
377
+ /**
378
+ * Visit a parse tree produced by `CNextParser.forStatement`.
379
+ * @param ctx the parse tree
380
+ * @return the visitor result
381
+ */
382
+ visitForStatement?: (ctx: ForStatementContext) => Result;
383
+ /**
384
+ * Visit a parse tree produced by `CNextParser.forInit`.
385
+ * @param ctx the parse tree
386
+ * @return the visitor result
387
+ */
388
+ visitForInit?: (ctx: ForInitContext) => Result;
389
+ /**
390
+ * Visit a parse tree produced by `CNextParser.forVarDecl`.
391
+ * @param ctx the parse tree
392
+ * @return the visitor result
393
+ */
394
+ visitForVarDecl?: (ctx: ForVarDeclContext) => Result;
395
+ /**
396
+ * Visit a parse tree produced by `CNextParser.forAssignment`.
397
+ * @param ctx the parse tree
398
+ * @return the visitor result
399
+ */
400
+ visitForAssignment?: (ctx: ForAssignmentContext) => Result;
401
+ /**
402
+ * Visit a parse tree produced by `CNextParser.forUpdate`.
403
+ * @param ctx the parse tree
404
+ * @return the visitor result
405
+ */
406
+ visitForUpdate?: (ctx: ForUpdateContext) => Result;
407
+ /**
408
+ * Visit a parse tree produced by `CNextParser.returnStatement`.
409
+ * @param ctx the parse tree
410
+ * @return the visitor result
411
+ */
412
+ visitReturnStatement?: (ctx: ReturnStatementContext) => Result;
413
+ /**
414
+ * Visit a parse tree produced by `CNextParser.switchStatement`.
415
+ * @param ctx the parse tree
416
+ * @return the visitor result
417
+ */
418
+ visitSwitchStatement?: (ctx: SwitchStatementContext) => Result;
419
+ /**
420
+ * Visit a parse tree produced by `CNextParser.switchCase`.
421
+ * @param ctx the parse tree
422
+ * @return the visitor result
423
+ */
424
+ visitSwitchCase?: (ctx: SwitchCaseContext) => Result;
425
+ /**
426
+ * Visit a parse tree produced by `CNextParser.caseLabel`.
427
+ * @param ctx the parse tree
428
+ * @return the visitor result
429
+ */
430
+ visitCaseLabel?: (ctx: CaseLabelContext) => Result;
431
+ /**
432
+ * Visit a parse tree produced by `CNextParser.defaultCase`.
433
+ * @param ctx the parse tree
434
+ * @return the visitor result
435
+ */
436
+ visitDefaultCase?: (ctx: DefaultCaseContext) => Result;
437
+ /**
438
+ * Visit a parse tree produced by `CNextParser.expression`.
439
+ * @param ctx the parse tree
440
+ * @return the visitor result
441
+ */
442
+ visitExpression?: (ctx: ExpressionContext) => Result;
443
+ /**
444
+ * Visit a parse tree produced by `CNextParser.ternaryExpression`.
445
+ * @param ctx the parse tree
446
+ * @return the visitor result
447
+ */
448
+ visitTernaryExpression?: (ctx: TernaryExpressionContext) => Result;
449
+ /**
450
+ * Visit a parse tree produced by `CNextParser.orExpression`.
451
+ * @param ctx the parse tree
452
+ * @return the visitor result
453
+ */
454
+ visitOrExpression?: (ctx: OrExpressionContext) => Result;
455
+ /**
456
+ * Visit a parse tree produced by `CNextParser.andExpression`.
457
+ * @param ctx the parse tree
458
+ * @return the visitor result
459
+ */
460
+ visitAndExpression?: (ctx: AndExpressionContext) => Result;
461
+ /**
462
+ * Visit a parse tree produced by `CNextParser.equalityExpression`.
463
+ * @param ctx the parse tree
464
+ * @return the visitor result
465
+ */
466
+ visitEqualityExpression?: (ctx: EqualityExpressionContext) => Result;
467
+ /**
468
+ * Visit a parse tree produced by `CNextParser.relationalExpression`.
469
+ * @param ctx the parse tree
470
+ * @return the visitor result
471
+ */
472
+ visitRelationalExpression?: (ctx: RelationalExpressionContext) => Result;
473
+ /**
474
+ * Visit a parse tree produced by `CNextParser.bitwiseOrExpression`.
475
+ * @param ctx the parse tree
476
+ * @return the visitor result
477
+ */
478
+ visitBitwiseOrExpression?: (ctx: BitwiseOrExpressionContext) => Result;
479
+ /**
480
+ * Visit a parse tree produced by `CNextParser.bitwiseXorExpression`.
481
+ * @param ctx the parse tree
482
+ * @return the visitor result
483
+ */
484
+ visitBitwiseXorExpression?: (ctx: BitwiseXorExpressionContext) => Result;
485
+ /**
486
+ * Visit a parse tree produced by `CNextParser.bitwiseAndExpression`.
487
+ * @param ctx the parse tree
488
+ * @return the visitor result
489
+ */
490
+ visitBitwiseAndExpression?: (ctx: BitwiseAndExpressionContext) => Result;
491
+ /**
492
+ * Visit a parse tree produced by `CNextParser.shiftExpression`.
493
+ * @param ctx the parse tree
494
+ * @return the visitor result
495
+ */
496
+ visitShiftExpression?: (ctx: ShiftExpressionContext) => Result;
497
+ /**
498
+ * Visit a parse tree produced by `CNextParser.additiveExpression`.
499
+ * @param ctx the parse tree
500
+ * @return the visitor result
501
+ */
502
+ visitAdditiveExpression?: (ctx: AdditiveExpressionContext) => Result;
503
+ /**
504
+ * Visit a parse tree produced by `CNextParser.multiplicativeExpression`.
505
+ * @param ctx the parse tree
506
+ * @return the visitor result
507
+ */
508
+ visitMultiplicativeExpression?: (ctx: MultiplicativeExpressionContext) => Result;
509
+ /**
510
+ * Visit a parse tree produced by `CNextParser.unaryExpression`.
511
+ * @param ctx the parse tree
512
+ * @return the visitor result
513
+ */
514
+ visitUnaryExpression?: (ctx: UnaryExpressionContext) => Result;
515
+ /**
516
+ * Visit a parse tree produced by `CNextParser.postfixExpression`.
517
+ * @param ctx the parse tree
518
+ * @return the visitor result
519
+ */
520
+ visitPostfixExpression?: (ctx: PostfixExpressionContext) => Result;
521
+ /**
522
+ * Visit a parse tree produced by `CNextParser.postfixOp`.
523
+ * @param ctx the parse tree
524
+ * @return the visitor result
525
+ */
526
+ visitPostfixOp?: (ctx: PostfixOpContext) => Result;
527
+ /**
528
+ * Visit a parse tree produced by `CNextParser.primaryExpression`.
529
+ * @param ctx the parse tree
530
+ * @return the visitor result
531
+ */
532
+ visitPrimaryExpression?: (ctx: PrimaryExpressionContext) => Result;
533
+ /**
534
+ * Visit a parse tree produced by `CNextParser.sizeofExpression`.
535
+ * @param ctx the parse tree
536
+ * @return the visitor result
537
+ */
538
+ visitSizeofExpression?: (ctx: SizeofExpressionContext) => Result;
539
+ /**
540
+ * Visit a parse tree produced by `CNextParser.castExpression`.
541
+ * @param ctx the parse tree
542
+ * @return the visitor result
543
+ */
544
+ visitCastExpression?: (ctx: CastExpressionContext) => Result;
545
+ /**
546
+ * Visit a parse tree produced by `CNextParser.structInitializer`.
547
+ * @param ctx the parse tree
548
+ * @return the visitor result
549
+ */
550
+ visitStructInitializer?: (ctx: StructInitializerContext) => Result;
551
+ /**
552
+ * Visit a parse tree produced by `CNextParser.fieldInitializerList`.
553
+ * @param ctx the parse tree
554
+ * @return the visitor result
555
+ */
556
+ visitFieldInitializerList?: (ctx: FieldInitializerListContext) => Result;
557
+ /**
558
+ * Visit a parse tree produced by `CNextParser.fieldInitializer`.
559
+ * @param ctx the parse tree
560
+ * @return the visitor result
561
+ */
562
+ visitFieldInitializer?: (ctx: FieldInitializerContext) => Result;
563
+ /**
564
+ * Visit a parse tree produced by `CNextParser.arrayInitializer`.
565
+ * @param ctx the parse tree
566
+ * @return the visitor result
567
+ */
568
+ visitArrayInitializer?: (ctx: ArrayInitializerContext) => Result;
569
+ /**
570
+ * Visit a parse tree produced by `CNextParser.arrayInitializerElement`.
571
+ * @param ctx the parse tree
572
+ * @return the visitor result
573
+ */
574
+ visitArrayInitializerElement?: (ctx: ArrayInitializerElementContext) => Result;
575
+ /**
576
+ * Visit a parse tree produced by `CNextParser.memberAccess`.
577
+ * @param ctx the parse tree
578
+ * @return the visitor result
579
+ */
580
+ visitMemberAccess?: (ctx: MemberAccessContext) => Result;
581
+ /**
582
+ * Visit a parse tree produced by `CNextParser.arrayAccess`.
583
+ * @param ctx the parse tree
584
+ * @return the visitor result
585
+ */
586
+ visitArrayAccess?: (ctx: ArrayAccessContext) => Result;
587
+ /**
588
+ * Visit a parse tree produced by `CNextParser.argumentList`.
589
+ * @param ctx the parse tree
590
+ * @return the visitor result
591
+ */
592
+ visitArgumentList?: (ctx: ArgumentListContext) => Result;
593
+ /**
594
+ * Visit a parse tree produced by `CNextParser.type`.
595
+ * @param ctx the parse tree
596
+ * @return the visitor result
597
+ */
598
+ visitType?: (ctx: TypeContext) => Result;
599
+ /**
600
+ * Visit a parse tree produced by `CNextParser.scopedType`.
601
+ * @param ctx the parse tree
602
+ * @return the visitor result
603
+ */
604
+ visitScopedType?: (ctx: ScopedTypeContext) => Result;
605
+ /**
606
+ * Visit a parse tree produced by `CNextParser.qualifiedType`.
607
+ * @param ctx the parse tree
608
+ * @return the visitor result
609
+ */
610
+ visitQualifiedType?: (ctx: QualifiedTypeContext) => Result;
611
+ /**
612
+ * Visit a parse tree produced by `CNextParser.primitiveType`.
613
+ * @param ctx the parse tree
614
+ * @return the visitor result
615
+ */
616
+ visitPrimitiveType?: (ctx: PrimitiveTypeContext) => Result;
617
+ /**
618
+ * Visit a parse tree produced by `CNextParser.userType`.
619
+ * @param ctx the parse tree
620
+ * @return the visitor result
621
+ */
622
+ visitUserType?: (ctx: UserTypeContext) => Result;
623
+ /**
624
+ * Visit a parse tree produced by `CNextParser.stringType`.
625
+ * @param ctx the parse tree
626
+ * @return the visitor result
627
+ */
628
+ visitStringType?: (ctx: StringTypeContext) => Result;
629
+ /**
630
+ * Visit a parse tree produced by `CNextParser.arrayType`.
631
+ * @param ctx the parse tree
632
+ * @return the visitor result
633
+ */
634
+ visitArrayType?: (ctx: ArrayTypeContext) => Result;
635
+ /**
636
+ * Visit a parse tree produced by `CNextParser.genericType`.
637
+ * @param ctx the parse tree
638
+ * @return the visitor result
639
+ */
640
+ visitGenericType?: (ctx: GenericTypeContext) => Result;
641
+ /**
642
+ * Visit a parse tree produced by `CNextParser.typeArgument`.
643
+ * @param ctx the parse tree
644
+ * @return the visitor result
645
+ */
646
+ visitTypeArgument?: (ctx: TypeArgumentContext) => Result;
647
+ /**
648
+ * Visit a parse tree produced by `CNextParser.literal`.
649
+ * @param ctx the parse tree
650
+ * @return the visitor result
651
+ */
652
+ visitLiteral?: (ctx: LiteralContext) => Result;
653
+ }
654
+