Skip to content

Commit

Permalink
Merge pull request #25 from ElementW/master
Browse files Browse the repository at this point in the history
Fix lexer_read_on_line returning empty tokens at EOF
  • Loading branch information
vurtun committed Jan 17, 2020
2 parents 1c70a1d + a64d074 commit 1569895
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lexer.h
Original file line number Diff line number Diff line change
Expand Up @@ -1332,6 +1332,7 @@ lexer_read_on_line(struct lexer *lexer, struct lexer_token *token)
if (!lexer_read(lexer, &tok)) {
lexer->current = lexer->last;
lexer->line = lexer->last_line;
return 0;
}
if (!tok.line_crossed) {
*token = tok;
Expand Down

0 comments on commit 1569895

Please sign in to comment.