projects
/
ulas
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f54da88
)
WIP: label scoping
author
Lukas Krickl
<lukas@krickl.dev>
Tue, 28 Nov 2023 05:10:00 +0000
(06:10 +0100)
committer
Lukas Krickl
<lukas@krickl.dev>
Tue, 28 Nov 2023 05:10:00 +0000
(06:10 +0100)
include/ulas.h
patch
|
blob
|
history
diff --git
a/include/ulas.h
b/include/ulas.h
index d26dab27a3a54148355cdee92727a59ed43910ce..ed38f4a99d60c685587528e91bf8ce87d9456399 100644
(file)
--- 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;