Fix hang in comment lexer

This commit is contained in:
Tiffany Bennett 2016-08-13 18:51:26 -04:00
parent 71f0950111
commit 13eabf96c0

View file

@ -71,7 +71,7 @@ impl<'a> Iterator for TokenIterator<'a> {
'/' => match self.0.peek() {
Some(&'/') => loop {
match self.0.next() {
Some('\n') => return Some(Token::Comment(1)),
None | Some('\n') => return Some(Token::Comment(1)),
_ => ()
}
},