mirror of
https://github.com/PaddiM8/kalker.git
synced 2024-12-14 02:20:57 +01:00
Changed lexer to allow whitespace between number literal.
This commit is contained in:
parent
024a215a41
commit
f0889064b2
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user