1
0

Fix lexer bug

This commit is contained in:
Jeff 2024-12-03 16:57:35 -05:00
parent f25f658cd3
commit e241051870

View File

@ -218,7 +218,7 @@ impl<'src> Lexer<'src> {
continue;
}
if let ('e' | 'E', Some('+')) = (peek_char, peek_second_char) {
if let ('e' | 'E', Some('+' | '-')) = (peek_char, peek_second_char) {
self.next_char();
self.next_char();
@ -227,7 +227,8 @@ impl<'src> Lexer<'src> {
return Err(LexError::ExpectedCharacterMultiple {
expected: &[
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'e', 'E', '-',
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'e', 'E', '+',
'-',
],
actual: peek_char,
position: self.position,