package ppx_expect

  1. Overview
  2. Docs
Cram like framework for OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

v0.16.1.tar.gz
md5=f2db0b9091a532f2f67a2bf0b8d8b268
sha512=b24df7db91ef0d72f3bf753b526b7a21c8fd06c8814367f4f06e2356bace7353891207dd5f4ccaa60542000fb2c6a179b38ffd9908803274c169e3b95a754ece

doc/ppx_expect.matcher/Expect_test_matcher/Cst/Line/index.html

Module Cst.LineSource

Sourcetype 'a not_blank = {
  1. trailing_blanks : Base.string;
    (*

    regexp: " \t*"

    *)
  2. orig : Base.string;
    (*

    Original contents of the line without the trailing blanks or indentation. regexp: "^\n*^ \t\n"

    *)
  3. data : 'a;
    (*

    Data associated to the line.

    *)
}
Sourceval sexp_of_not_blank : ('a -> Sexplib0.Sexp.t) -> 'a not_blank -> Sexplib0.Sexp.t
Sourceval compare_not_blank : ('a -> 'a -> Base.int) -> 'a not_blank -> 'a not_blank -> Base.int
Sourceval equal_not_blank : ('a -> 'a -> Base.bool) -> 'a not_blank -> 'a not_blank -> Base.bool
Sourcetype 'a t =
  1. | Blank of Base.string
    (*

    regexp: " \t*"

    *)
  2. | Conflict_marker of Base.string
    (*

    regexp: "^(<

    ||

    |>

    |=

    )"

    *)
  3. | Not_blank of 'a not_blank
Sourceval sexp_of_t : ('a -> Sexplib0.Sexp.t) -> 'a t -> Sexplib0.Sexp.t
Sourceval compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
Sourceval equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
Sourceval invariant : ('a -> Base.unit) -> 'a t -> Base.unit
Sourceval map : 'a t -> f:(Base.string -> 'a -> 'b) -> 'b t

The callback receive the orig and data fields

Sourceval strip : 'a t -> 'a t

Delete trailing blanks (everything for blank lines)

Sourceval data : 'a t -> blank:'a -> conflict_marker:(Base.string -> 'a) -> 'a
OCaml

Innovation. Community. Security.