lang: lex: fix identifier prefixed with underscore being tokenised incorrectly

This commit is contained in:
2024-11-19 14:00:42 +00:00
parent eda7a1f951
commit 0f3328565e

View File

@@ -1020,14 +1020,14 @@ static enum ivy_status pump_tokens(struct ivy_lexer *lex)
c = peek(lex);
}
if (char_can_begin_symbol(c)) {
return read_symbol(lex);
}
if (isalpha(c) || c == '_') {
return read_ident(lex);
}
if (char_can_begin_symbol(c)) {
return read_symbol(lex);
}
if (isdigit(c)) {
return read_number(lex);
}