projects
/
ulas
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
91b198d
)
Added '@' check to islabelname
author
Lukas Krickl
<lukas@krickl.dev>
Sun, 3 Dec 2023 20:58:29 +0000
(21:58 +0100)
committer
Lukas Krickl
<lukas@krickl.dev>
Sun, 3 Dec 2023 20:58:29 +0000
(21:58 +0100)
src/ulas.c
patch
|
blob
|
history
tests/t0.s
patch
|
blob
|
history
diff --git
a/src/ulas.c
b/src/ulas.c
index 97d25399ff6cc82bfb3e11d97ad37ec56e9a3dfd..5ca228fe3de2858e658196f913e2cc6e28a8f469 100644
(file)
--- a/
src/ulas.c
+++ b/
src/ulas.c
@@
-208,6
+208,10
@@
int ulas_isname(const char *tok, unsigned long n) {
}
int ulas_islabelname(const char *tok, unsigned long n) {
+ if (tok[0] == '@' && n > 0) {
+ tok+=1;
+ n--;
+ }
return tok[n - 1] == ':' && ulas_isname(tok, n - 1);
}
diff --git
a/tests/t0.s
b/tests/t0.s
index cf5efec084d14a4e87ef9a9e5735e6c07f93ec93..4abdad79eceeebb3a2288908bd0327bedd9d3940 100644
(file)
--- a/
tests/t0.s
+++ b/
tests/t0.s
@@
-74,3
+74,4
@@
l1:
bit 0, [hl]
ld bc, l1 + 1
+@local1: