package parsexp

  1. Overview
  2. Docs

API for iterating over positions in an efficient way

type t
val create : t -> t
exception No_more

Exception raised when the iterator has reached the end of the sequence.

val advance_exn : t -> skip:int -> pos

advance t ~skip skips the next skip positions in the sequence, advance to the next position and return it. Raises No_more when reaching the end of the position set.

val advance_sexp_exn : t -> Sexplib0.Sexp.t -> range

Advance over a whole s-expression worth of positions. Returns the position range corresponding to that s-expression.

OCaml

Innovation. Community. Security.