From e9eead117702f84b281a17b4c840721d14e64581 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Fri, 3 Nov 2023 21:50:55 +0000 Subject: Symbols may now include digits in lexer This is mostly so labels get to have digits. This won't affect number tokens as that happens before symbols. --- asm/lexer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/asm/lexer.c b/asm/lexer.c index 7f37ce7..f2b63ba 100644 --- a/asm/lexer.c +++ b/asm/lexer.c @@ -136,7 +136,8 @@ char uppercase(char c) bool is_symbol(char c) { - return isalpha(c) || c == '-' || c == '_' || c == '.' || c == ':'; + return isalpha(c) || isdigit(c) || c == '-' || c == '_' || c == '.' || + c == ':'; } bool is_valid_hex_char(char c) -- cgit v1.2.3-13-gbd6f