From 7f334796e8d0619dc744b1345a7b7b73a27220f9 Mon Sep 17 00:00:00 2001 From: Melodi <62381002+Melodi17@users.noreply.github.com> Date: Sat, 9 Aug 2025 09:45:22 +1000 Subject: added method calling and for loops --- Compiler/gen/CGrammarVisitor.cs | 75 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 66 insertions(+), 9 deletions(-) (limited to 'Compiler/gen/CGrammarVisitor.cs') diff --git a/Compiler/gen/CGrammarVisitor.cs b/Compiler/gen/CGrammarVisitor.cs index e0689f0..a3271f8 100644 --- a/Compiler/gen/CGrammarVisitor.cs +++ b/Compiler/gen/CGrammarVisitor.cs @@ -38,11 +38,19 @@ public interface ICGrammarVisitor : IParseTreeVisitor { /// The visitor result. Result VisitProgram([NotNull] CGrammarParser.ProgramContext context); /// - /// Visit a parse tree produced by . + /// Visit a parse tree produced by the functionPrototype + /// labeled alternative in . /// /// The parse tree. /// The visitor result. - Result VisitFunction([NotNull] CGrammarParser.FunctionContext context); + Result VisitFunctionPrototype([NotNull] CGrammarParser.FunctionPrototypeContext context); + /// + /// Visit a parse tree produced by the functionDefinition + /// labeled alternative in . + /// + /// The parse tree. + /// The visitor result. + Result VisitFunctionDefinition([NotNull] CGrammarParser.FunctionDefinitionContext context); /// /// Visit a parse tree produced by . /// @@ -70,6 +78,48 @@ public interface ICGrammarVisitor : IParseTreeVisitor { /// The visitor result. Result VisitIfStatement([NotNull] CGrammarParser.IfStatementContext context); /// + /// Visit a parse tree produced by the forExprStatement + /// labeled alternative in . + /// + /// The parse tree. + /// The visitor result. + Result VisitForExprStatement([NotNull] CGrammarParser.ForExprStatementContext context); + /// + /// Visit a parse tree produced by the forDeclStatement + /// labeled alternative in . + /// + /// The parse tree. + /// The visitor result. + Result VisitForDeclStatement([NotNull] CGrammarParser.ForDeclStatementContext context); + /// + /// Visit a parse tree produced by the whileStatement + /// labeled alternative in . + /// + /// The parse tree. + /// The visitor result. + Result VisitWhileStatement([NotNull] CGrammarParser.WhileStatementContext context); + /// + /// Visit a parse tree produced by the doWhileStatement + /// labeled alternative in . + /// + /// The parse tree. + /// The visitor result. + Result VisitDoWhileStatement([NotNull] CGrammarParser.DoWhileStatementContext context); + /// + /// Visit a parse tree produced by the breakStatement + /// labeled alternative in . + /// + /// The parse tree. + /// The visitor result. + Result VisitBreakStatement([NotNull] CGrammarParser.BreakStatementContext context); + /// + /// Visit a parse tree produced by the continueStatement + /// labeled alternative in . + /// + /// The parse tree. + /// The visitor result. + Result VisitContinueStatement([NotNull] CGrammarParser.ContinueStatementContext context); + /// /// Visit a parse tree produced by the expressionStatement /// labeled alternative in . /// @@ -84,6 +134,13 @@ public interface ICGrammarVisitor : IParseTreeVisitor { /// The visitor result. Result VisitBlockStatement([NotNull] CGrammarParser.BlockStatementContext context); /// + /// Visit a parse tree produced by the nullStatement + /// labeled alternative in . + /// + /// The parse tree. + /// The visitor result. + Result VisitNullStatement([NotNull] CGrammarParser.NullStatementContext context); + /// /// Visit a parse tree produced by the variableDeclaration /// labeled alternative in . /// @@ -294,13 +351,6 @@ public interface ICGrammarVisitor : IParseTreeVisitor { /// The visitor result. Result VisitLogicalOrExpression([NotNull] CGrammarParser.LogicalOrExpressionContext context); /// - /// Visit a parse tree produced by the commaExpression - /// labeled alternative in . - /// - /// The parse tree. - /// The visitor result. - Result VisitCommaExpression([NotNull] CGrammarParser.CommaExpressionContext context); - /// /// Visit a parse tree produced by the incrementPrefixExpression /// labeled alternative in . /// @@ -329,6 +379,13 @@ public interface ICGrammarVisitor : IParseTreeVisitor { /// The visitor result. Result VisitBitwiseOrExpression([NotNull] CGrammarParser.BitwiseOrExpressionContext context); /// + /// Visit a parse tree produced by the callExpression + /// labeled alternative in . + /// + /// The parse tree. + /// The visitor result. + Result VisitCallExpression([NotNull] CGrammarParser.CallExpressionContext context); + /// /// Visit a parse tree produced by the addExpression /// labeled alternative in . /// -- cgit v1.3.1