diff --git a/dust-lang/src/lexer.rs b/dust-lang/src/lexer.rs index 258187e..5a0aad8 100644 --- a/dust-lang/src/lexer.rs +++ b/dust-lang/src/lexer.rs @@ -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,