aboutsummaryrefslogtreecommitdiffhomepage
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.c b/main.c
index bb91a3b..8db2f31 100644
--- a/main.c
+++ b/main.c
@@ -214,7 +214,7 @@ struct Token* tokenize(char* src) {
tok->kind = TK_L_INT;
tok->value = calloc(pos - start + 1, sizeof(char));
memcpy(tok->value, src + start, pos - start);
- } else if (isalpha(c)) {
+ } else if (isalpha(c) || c == '_') {
pos -= 1;
start = pos;
while (isalnum(src[pos]) || src[pos] == '_') {