Fix lexer bug
This commit is contained in:
parent
f25f658cd3
commit
e241051870
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user