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.

Pretty-printing

val dump : t Fmt.t

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

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 : syntax:Syntax.t -> loc:Location.t -> string list -> t list

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.