lexer: Handle '_' digit seperator properly

Signed-off-by: Ian Moffett <ian@mirocom.org>
This commit is contained in:
2026-02-16 14:19:58 -05:00
parent 0317c6a4ca
commit 68e7f41181

View File

@@ -385,7 +385,11 @@ lexer_scan_num(struct rifle_state *state, int lc, struct token *tok)
return -1;
}
if (!isxdigit(c) && c != '_') {
if (c == '_') {
continue;
}
if (!isxdigit(c)) {
lexer_putback(state, c);
buf[buf_ind] = '\0';
break;