package sexp_select

  1. Overview
  2. Docs
A library to use CSS-style selectors to traverse sexp trees

Install

Dune Dependency

Authors

Maintainers

Sources

v0.17.0.tar.gz
sha256=4501d04143dd5c73662b01c4c8952e11edfd44a905f10cc6ccf86c722173a77e

doc/sexp_select/Sexp_select/index.html

Module Sexp_selectSource

same as select, but the parsing of the selection expression is done once so the parsed result can be shared across the evaluation of multiple sexps.

Sourceval select_single_exn : Base.string -> Base.Sexp.t -> Base.Sexp.t

Like select, but returns a single element. Raises if that is not possible (e.g. if there are no matches or if there are multiple matches)

Sourceval format_program_outputs : Base.Sexp.t -> Base.string Base.list -> Base.string

run a list of programs on an input sexp and nicely format the programs and their corresponding outputs when run on the given sexp, for use in -help output and expect tests.

invert the behavior of select; drop the fields matching the selection expression.

same as deselect, but the parsing of the selection expression is done once so the parsed result can be shared across the evaluation of multiple sexps.

Sourcemodule For_testing : sig ... end

Reference implementations of select and deselect that are linked, to verify that operations are inversions of each other.

OCaml

Innovation. Community. Security.