Changed lexer to allow whitespace between number literal.

This commit is contained in:
PaddiM8 2020-06-05 17:18:36 +02:00
parent 024a215a41
commit f0889064b2

View File

@ -102,7 +102,9 @@ impl<'a> Lexer<'a> {
let start = self.index;
let mut end = start;
while !self.is_at_end() && (self.peek().is_digit(10) || self.peek() == '.') {
while !self.is_at_end()
&& (self.peek().is_digit(10) || self.peek() == '.' || self.peek().is_whitespace())
{
end += 1;
self.advance();
}