Up

Module Annotated

Signature

type pos = Sexplib.Pre_sexp.Annotated.pos = {
line
: int ;
col
: int ;
offset
: int ;
}
type range = Sexplib.Pre_sexp.Annotated.range = {
start_pos
: pos ;
end_pos
: pos ;
}
type t = Sexplib.Pre_sexp.Annotated.t =
| Atom of range * Sexplib.Type.t
| List of range * t list * Sexplib.Type.t
type 'a conv = [
| `Error of exn * t
| `Result of 'a
]
exception Conv_exn of string * exn
type stack = Sexplib.Pre_sexp.Annotated.stack = {
mutable positions
: pos list ;
mutable stack
: t list list ;
}
val get_sexp : t -> Sexplib.Type.t
val get_range : t -> range
val find_sexp : t -> Sexplib.Type.t -> t option
val parse : ?parse_pos:Sexplib.Sexp.Parse_pos.t -> ?len:int -> string -> (string, t) Sexplib.Sexp.parse_result
val input_sexp : ?parse_pos:Sexplib.Sexp.Parse_pos.t -> Pervasives.in_channel -> t
val input_sexps : ?parse_pos:Sexplib.Sexp.Parse_pos.t -> ?buf:string -> Pervasives.in_channel -> t list
val input_rev_sexps : ?parse_pos:Sexplib.Sexp.Parse_pos.t -> ?buf:string -> Pervasives.in_channel -> t list
val load_sexp : ?strict:bool -> ?buf:string -> string -> t
val load_sexps : ?buf:string -> string -> t list
val load_rev_sexps : ?buf:string -> string -> t list
val of_string : string -> t
val of_bigstring : Sexplib.Sexp.bigstring -> t
val conv : (Sexplib.Type.t -> 'a) -> t -> 'a conv
val get_conv_exn : file:string -> exc:exn -> t -> exn