Fix bug where the entire iterator would be eaten by a comment
This commit is contained in:
parent
5688e03b8a
commit
bcfd809c92
@ -150,7 +150,7 @@ impl<'a> Lexer<'a> {
|
||||
self.pos.next_char();
|
||||
match self.buf.peek().expect("expected something after '/'") {
|
||||
'/' => {
|
||||
self.buf.by_ref().skip_while(|x| x != &'\n').count();
|
||||
self.buf.by_ref().take_while(|x| x != &'\n').for_each(drop);
|
||||
}
|
||||
'*' => {
|
||||
while let Some(tok) = self.buf.next() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user