From 9ad4af46a35955fc135121d2a8df98c357ccf259 Mon Sep 17 00:00:00 2001 From: Lukas Krickl Date: Tue, 28 Nov 2023 06:10:00 +0100 Subject: [PATCH] WIP: label scoping --- include/ulas.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/ulas.h b/include/ulas.h index d26dab2..ed38f4a 100644 --- a/include/ulas.h +++ b/include/ulas.h @@ -158,6 +158,8 @@ struct ulas_sym { char *name; struct ulas_tok tok; enum ulas_syms type; + // this label's scope index + int scope; }; // holds all currently defned symbols @@ -193,6 +195,10 @@ struct ulas { unsigned int address; + // current scope index + // each global-label increments the scope + int scope; + // internal counter // used whenever a new unique number might be needed int icntr; -- 2.30.2