package sexplib

  1. Overview
  2. Docs
module Rel_pos = Src_pos.Relative
module Abs_pos = Src_pos.Absolute
type last_atom = {
  1. immed_after : Abs_pos.t;
  2. unescaped : bool;
}
type state = {
  1. mutable row_shift : Rel_pos.t;
  2. mutable current : Abs_pos.t;
  3. mutable last_atom : last_atom option;
  4. mutable last_comment_row : int;
}
type 'a t = (char -> unit) -> state -> 'a
val return : 'a -> 'b -> 'c -> 'a
val bind : ('a -> 'b -> 'c) -> f:('c -> 'a -> 'b -> 'd) -> 'a -> 'b -> 'd
val run : 'a -> ('a -> state -> 'b) -> 'b
val emit_char : (char -> 'a) -> state -> char -> unit
val emit_string : (char -> 'a) -> state -> string -> unit
val emit_chars : (char -> 'a) -> state -> char -> n:int -> unit
val advance : (char -> 'a) -> anchor:Abs_pos.t -> state -> by:Sexplib__Src_pos.Relative.t -> unescaped_atom:bool -> line_comment:bool -> unit
val render_t : (char -> 'a) -> anchor:Abs_pos.t -> state -> t -> unit
val render_toc : (char -> 'a) -> anchor:Abs_pos.t -> state -> t_or_comment -> unit
val render_c : (char -> 'a) -> anchor:Abs_pos.t -> state -> comment -> unit
val render : t_or_comment -> (char -> 'a) -> state -> unit
val sexp : t_or_comment -> (char -> 'a) -> state -> unit