An OCaml library to parse ZNC logs
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

15 lines
289 B

let from_channel chan =
let lexbuf = Sedlexing.Utf8.from_channel chan in
let next_line () = Lexer.file lexbuf in
let msgs = ref [] in
let rec loop = function
| Some msg -> msgs := msg :: !msgs; loop (next_line ())
| None -> ()
in
loop (next_line ());
List.rev !msgs