package mdx

  1. Overview
  2. Docs

Toplevel phrases.

type t = {
  1. vpad : int;
  2. hpad : int;
  3. pos : Lexing.position;
  4. command : string list;
  5. output : Output.t list;
}

The type for top-level phrases.

type toplevel_tests = {
  1. tests : t list;
  2. end_pad : string option;
}

Pretty-printing

val dump : t Fmt.t

dump is the printer for dumping toplevel phrases. Useful for debugging.

val dump_toplevel_tests : toplevel_tests Fmt.t
val pp : t Fmt.t

pp is the pretty-printer for top-level phrases. pad is the size of the optionnalwhitespace left padding (by default is is 0).

val pp_command : t Fmt.t

pp_command is the pretty-printer for toplevel commands.

Parser

val of_lines : loc:Location.t -> string list -> toplevel_tests

of_lines ~loc lines is the list of toplevel blocks from location loc. Return the vertical and horizontal whitespace padding as well.

OCaml

Innovation. Community. Security.