mirror of
https://github.com/PaddiM8/kalker.git
synced 2024-11-08 00:44:40 +01:00
Fixed lexer not ignoring whitespace properly.
This commit is contained in:
parent
9495ab9f6e
commit
995897fc25
@ -73,11 +73,11 @@ impl<'a> Lexer<'a> {
|
||||
};
|
||||
|
||||
while c == ' ' || c == '\t' || c == '\r' || c == '\n' {
|
||||
if let Some(next_c) = self.advance() {
|
||||
c = next_c;
|
||||
} else {
|
||||
if let None = self.advance() {
|
||||
return build(TokenKind::EOF, "", (self.index, self.index));
|
||||
}
|
||||
|
||||
c = *self.peek().unwrap();
|
||||
}
|
||||
|
||||
if c.is_digit(10) {
|
||||
|
Loading…
Reference in New Issue
Block a user