package ppx_expect_nobase

  1. Overview
  2. Docs
Cram like framework for OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

v0.17+nobase.tar.gz
sha256=304f9e7141a486c0206ecdfcde09e57a022481a71539e5dbb530c0224e7e5d33

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

Module Cst.LineSource

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

    regexp: " \t*"

    *)
  2. orig : 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 -> int) -> 'a not_blank -> 'a not_blank -> int
Sourceval equal_not_blank : ('a -> 'a -> bool) -> 'a not_blank -> 'a not_blank -> bool
Sourcetype 'a t =
  1. | Blank of string
    (*

    regexp: " \t*"

    *)
  2. | Conflict_marker of 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 -> unit) -> 'a t -> unit
Sourceval map : 'a t -> f:(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:(string -> 'a) -> 'a
OCaml

Innovation. Community. Security.