From 3051d6b66f099a12ca53b95b268d73cccd7a8c4d Mon Sep 17 00:00:00 2001 From: "Tristan B. Kildaire" Date: Fri, 4 Jun 2021 11:36:58 +0200 Subject: [PATCH] Added marking capability to Statement --- source/tlang/compiler/symbols/data.d | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/source/tlang/compiler/symbols/data.d b/source/tlang/compiler/symbols/data.d index 18e1900..e59af66 100644 --- a/source/tlang/compiler/symbols/data.d +++ b/source/tlang/compiler/symbols/data.d @@ -70,6 +70,7 @@ public class Program public class Statement { private Container container; + private bool marked; public final void parentTo(Container container) { @@ -80,6 +81,22 @@ public class Statement { return container; } + + /** + * Returns the ready-to-reference state of this Statement + */ + public bool isMarked() + { + return marked; + } + + /** + * Marks this Statement as ready-to-reference + */ + public void mark() + { + marked = true; + } } public enum AccessorType