Skip to content

Commit

Permalink
[lexer: single-line-comment] Fix bug when single line comment is last…
Browse files Browse the repository at this point in the history
… line of file (#228)
  • Loading branch information
croraf authored and jasonwilliams committed Jan 20, 2020
1 parent 881873c commit ce9af33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/syntax/lexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ impl<'a> Lexer<'a> {
/// read_line attempts to read until the end of the line and returns the String object or a LexerError
fn read_line(&mut self) -> Result<String, LexerError> {
let mut buf = String::new();
loop {
while self.preview_next().is_some() {
let ch = self.next()?;
match ch {
_ if ch.is_ascii_control() => {
Expand Down

0 comments on commit ce9af33

Please sign in to comment.