1
0

Fix minus sign lexing

This commit is contained in:
Jeff 2024-11-07 19:23:59 -05:00
parent d15247a799
commit 27fa3ef7cf

View File

@ -354,7 +354,10 @@ impl<'src> Lexer<'src> {
fn lex_minus(&mut self) -> Result<(Token<'src>, Span), LexError> { fn lex_minus(&mut self) -> Result<(Token<'src>, Span), LexError> {
let start_position = self.position; let start_position = self.position;
if self.peek_char().is_some_and(|char| char.is_ascii_digit()) { if self
.peek_second_char()
.is_some_and(|char| char.is_ascii_digit())
{
return self.lex_numeric(); return self.lex_numeric();
} }