Pure OCaml Yaml 1.2 reader and writer using Bytesrw

-deadcode

Changed files
+1 -14
lib
+1 -11
lib/parser.ml
···
(** Get next event *)
let next t =
if t.finished then None
-
else begin
+
else
let event, span = parse t in
Some { Event.event; span }
-
end
-
-
(** Peek at next event *)
-
let peek t =
-
(* Parser is not easily peekable without full state save/restore *)
-
(* For now, we don't support peek - could add caching if needed *)
-
if t.finished then None
-
else
-
(* Just call next and the caller will have to deal with it *)
-
next t
(** Iterate over all events *)
let iter f t =
-3
lib/parser.mli
···
val next : t -> Event.spanned option
(** Get next event *)
-
val peek : t -> Event.spanned option
-
(** Peek at next event without consuming *)
-
(** {2 Iteration} *)
val iter : (Event.spanned -> unit) -> t -> unit