Check for EOF ("\0") when reading comments

This commit is contained in:
Eryn Wells 2016-12-25 14:34:11 -07:00
parent b2f7afef07
commit 953870fae0

View file

@ -136,6 +136,10 @@ impl Lexer {
self.handle_newline();
*token = Some(Token::Comment(self.value()));
}
else if c.is_eof() {
*token = Some(Token::Comment(self.value()));
}
self.advance();
}
}