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/Context.cs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Compiler/Context.cs (limited to 'Compiler/Context.cs') diff --git a/Compiler/Context.cs b/Compiler/Context.cs new file mode 100644 index 0000000..52e577f --- /dev/null +++ b/Compiler/Context.cs @@ -0,0 +1,23 @@ +namespace Q1.Compiler; + +using Antlr4.Runtime; + +public class Context : ParserRuleContext +{ + public string? LoopEndBranch; + public string? LoopBodyBranch; + + public Context() { } + + public Context(ParserRuleContext parent, int invokingStateNumber) + : base((Context) parent, invokingStateNumber) + { + } + + + public void SyncProps(Context childCtx) + { + childCtx.LoopBodyBranch = this.LoopBodyBranch; + childCtx.LoopEndBranch = this.LoopEndBranch; + } +} \ No newline at end of file -- cgit v1.3.1