Restore eof_reached

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
This commit is contained in:
Jérémie Dimino 2018-07-01 01:36:26 +07:00 committed by Rudi Grinberg
parent d6c35e01df
commit 6823fb0d43
2 changed files with 6 additions and 0 deletions

View File

@ -12,3 +12,5 @@ val first_line : Lexing.lexbuf -> first_line
(** Parse the first line of a versioned file but do not fail if it
doesn't start with [(lang ...)]. *)
val maybe_first_line : Lexing.lexbuf -> first_line option
val eof_reached : Lexing.lexbuf -> bool

View File

@ -61,6 +61,10 @@ and to_eol = parse
{ ()
}
and eof_reached = parse
| eof { true }
| "" { false }
{
let first_line lb =
match maybe_first_line lb with