aboutsummaryrefslogtreecommitdiff
path: root/asm
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2023-11-03 21:50:55 +0000
committerAryadev Chavali <aryadev@aryadevchavali.com>2023-11-03 21:50:55 +0000
commite9eead117702f84b281a17b4c840721d14e64581 (patch)
tree3e723a124e1f60abadf8057ad9fc1e51ba97c81c /asm
parente6f580ba56b3cb2a41ef5436aaf6c55d6500490d (diff)
downloadovm-e9eead117702f84b281a17b4c840721d14e64581.tar.gz
ovm-e9eead117702f84b281a17b4c840721d14e64581.tar.bz2
ovm-e9eead117702f84b281a17b4c840721d14e64581.zip
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.
Diffstat (limited to 'asm')
-rw-r--r--asm/lexer.c3
1 files changed, 2 insertions, 1 deletions
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)