From: Lukas Krickl Date: Sun, 3 Dec 2023 20:58:29 +0000 (+0100) Subject: Added '@' check to islabelname X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=68cf1da422479f8f22578286db7cdcf3f3d1c5b7;p=ulas%2F.git Added '@' check to islabelname --- diff --git a/src/ulas.c b/src/ulas.c index 97d2539..5ca228f 100644 --- 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 cf5efec..4abdad7 100644 --- a/tests/t0.s +++ b/tests/t0.s @@ -74,3 +74,4 @@ l1: bit 0, [hl] ld bc, l1 + 1 +@local1: