lang: lex: fix identifier prefixed with underscore being tokenised incorrectly
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user