Skip to content

Commit

Permalink
Handle EOF in the comment lexing function
Browse files Browse the repository at this point in the history
  • Loading branch information
dmbaturin committed Apr 15, 2024
1 parent 9cd6575 commit bbd8d84
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/toml_lexer.mll
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@ and read_comment state buf =
in
token state lexbuf
}
| eof { token state lexbuf }
| [^ '\n' '\x00'-'\x08' '\x0B'-'\x1F' '\x7F']+
{ Buffer.add_string buf (Lexing.lexeme lexbuf); read_comment state buf lexbuf }

Expand Down

0 comments on commit bbd8d84

Please # to comment.