Module Sexplib.Sexp_with_layout.Render

module Rel_pos = Src_pos.Relative
module Abs_pos = Src_pos.Absolute
type last_atom = {
immed_after : Abs_pos.t;
unescaped : bool;
}
type state = {
mutable row_shift : Rel_pos.t;
mutable current : Abs_pos.t;
mutable last_atom : last_atom option;
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