aboutsummaryrefslogtreecommitdiff
path: root/src/lexer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lexer.c')
-rw-r--r--src/lexer.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lexer.c b/src/lexer.c
index d4a6d6a..5b43cb5 100644
--- a/src/lexer.c
+++ b/src/lexer.c
@@ -37,8 +37,10 @@ struct token token_resolve(char *str, u32 size)
if (str[length] == 'h' || str[length] == 'H') {
type = HEX_NUM;
+ length++;
} else if (str[length] == 'b' || str[length] == 'B') {
type = BIN_NUM;
+ length++;
} else {
type = DEC_NUM;
}
@@ -263,8 +265,10 @@ struct token token_resolve(char *str, u32 size)
while (ALPHA_NUMERIC(str[length]))
length++;
- if (length)
+ if (length) {
type = STRING;
+ length++;
+ }
}
}