Module Sexp_grammar_completion_protocol.Prefix

Prefix.t describes a path through an incomplete sexp up to but not including the current atom, if the point is in an incomplete atom.

Not included in Prefix.t:

1. preceding complete toplevel sexps, because we consider each sexp independently. 2. the atom prefix, because we leave it to the client to filter by atom prefix.

(See Rpc_complete for more on the division of labor between client and server.)

type t =
  1. | Hole
  2. | In_list of Core.Sexp.t list * t
include Ppx_compare_lib.Comparable.S with type t := t
val compare : t -> t -> int
val sexp_of_t : t -> Sexplib0.Sexp.t
include Core.Comparator.S with type t := t
type comparator_witness

of_sexp_prefix sexp_prefix discards preceding complete toplevel sexps. Any atom prefix is returned separately.

val of_substring : string -> pos:int -> len:int -> (t * Parsexp_prefix.Atom_prefix.t option) option

of_substring s ~pos ~len returns None if the specified substring is not a valid Sexp_prefix.t.

module Unstable : sig ... end
module Stable : sig ... end