package sexp

  1. Overview
  2. Docs
module Format : sig ... end
module Wrap_mode : sig ... end
type _ t =
  1. | Formats : _ Wrap_mode.t * Format.t list -> Core.Sexp.t list t
    (*

    Embed captures in the specified formats

    *)
  2. | List : _ Wrap_mode.t -> Core.Sexp.t t
    (*

    Return different capture expressions' results as a Sexp.List. In the case of Unwrap_always, the sequences consumed by each capture expression are concatenated, so the list may be longer (or shorter) than the number of capture expressions.

    *)
  3. | Record : _ Wrap_mode.t -> Core.Sexp.t t
    (*

    Return captures as a sexp record where the field names are the labels of the capturing expressions. In the case of Unwrap_always, the sequences consumed by each capture expression have the field name consed onto them, so the result may not actually be a list of pairs!

    *)
  4. | Single_capture : 'query_result Wrap_mode.t -> 'query_result t
    (*

    Expect exactly one capture in the pattern, and return its captured contents.

    *)
  5. | Map : Core.Sexp.t list Core.String.Map.t t
    (*

    Return a map from capture name to captures. Similar to doing Record Wrap_always and then [%of_sexp: Sexp.t list String.Map.t]

    *)
val sexp_of_t : ('a__001_ -> Sexplib0.Sexp.t) -> 'a__001_ t -> Sexplib0.Sexp.t
type some_output_method =
  1. | T : _ t -> some_output_method
val default_method : Query.t -> wrap_mode:_ Wrap_mode.t -> some_output_method

Determine a default output method to use based on whether the query contains numbered or named captures.

OCaml

Innovation. Community. Security.