Pure OCaml Yaml 1.2 reader and writer using Bytesrw

-deadcode

+1 -14
+1 -11
lib/parser.ml
··· 726 726 (** Get next event *) 727 727 let next t = 728 728 if t.finished then None 729 - else begin 729 + else 730 730 let event, span = parse t in 731 731 Some { Event.event; span } 732 - end 733 - 734 - (** Peek at next event *) 735 - let peek t = 736 - (* Parser is not easily peekable without full state save/restore *) 737 - (* For now, we don't support peek - could add caching if needed *) 738 - if t.finished then None 739 - else 740 - (* Just call next and the caller will have to deal with it *) 741 - next t 742 732 743 733 (** Iterate over all events *) 744 734 let iter f t =
-3
lib/parser.mli
··· 26 26 val next : t -> Event.spanned option 27 27 (** Get next event *) 28 28 29 - val peek : t -> Event.spanned option 30 - (** Peek at next event without consuming *) 31 - 32 29 (** {2 Iteration} *) 33 30 34 31 val iter : (Event.spanned -> unit) -> t -> unit