package ansifmt

  1. Overview
  2. Docs

Token is the formatter token data type.

type t = Token_type.t * string

A token is simply a pair (token type, lexeme).

val space : t

Token representing a single whitespace.

Exists as a constant due to its recurrent use.

val line_break : t

Token representing a line break. It is useful if you want to have a potential newline if it does not fit in one line.

Exists as a constant due to its recurrent use.

val comma : t

Token representing a comma.

Exists as a constant due to its recurrent use.

val colon : t

Token representing a colon.

Exists as a constant due to its recurrent use.

val format : ?stylizer:Stylizer.t -> t -> string
OCaml

Innovation. Community. Security.