From 4a039b51bba5ee384e921d4407b976f996546fce Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Wed, 14 Feb 2024 00:42:35 +0100 Subject: Check for T_IDENT, not T_STRING --- src/c8asm/parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/c8asm/parser.c b/src/c8asm/parser.c index d6e79f9..86f4ca5 100644 --- a/src/c8asm/parser.c +++ b/src/c8asm/parser.c @@ -124,7 +124,7 @@ parseaddr(struct token tok) { if (tok.kind == T_NUMBER) return (struct raw_addr){.val = parsenum(tok, NS_ADDR)}; - if (tok.kind == T_STRING) { + if (tok.kind == T_IDENT) { if (regtype(tok.sv) != RT_NONE) die_with_off(tok.sv.p, E_BADLABEL, U8_PRI_ARGS(tok.sv)); return (struct raw_addr){.label = true, .sv = tok.sv}; -- cgit v1.2.3