package ansifmt

  1. Overview
  2. Docs

Module Formatting.TokenSource

Token is the formatter token data type.

Sourcetype t = Token_type.t * string

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

Sourceval space : t

Token representing a single whitespace.

Exists as a constant due to its recurrent use.

Sourceval 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.

Sourceval comma : t

Token representing a comma.

Exists as a constant due to its recurrent use.

Sourceval colon : t

Token representing a colon.

Exists as a constant due to its recurrent use.

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

Innovation. Community. Security.