package ocamlformat-lib

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type t
val is_docstring : t -> Ocamlformat_stdlib.bool
include Ocamlformat_stdlib.Comparator.S with type t := t
type comparator_witness
type error = {
  1. kind : [ `Added of t | `Modified of t * t | `Dropped of t ];
  2. cmt_kind : [ `Comment | `Doc_comment ];
}
type pos =
  1. | Before
  2. | Within
  3. | After
type decoded_kind =
  1. | Verbatim of Ocamlformat_stdlib.string
    (*

    Original content.

    *)
  2. | Doc of Ocamlformat_stdlib.string
    (*

    Original content.

    *)
  3. | Normal of Ocamlformat_stdlib.string
    (*

    Original content with indentation trimmed. Trailing spaces are not removed.

    *)
  4. | Code of Ocamlformat_stdlib.string
    (*

    Source code with indentation removed.

    *)
  5. | Asterisk_prefixed of Ocamlformat_stdlib.string Ocamlformat_stdlib.list
    (*

    Line splitted with asterisks removed.

    *)
type decoded = {
  1. prefix : Ocamlformat_stdlib.string;
    (*

    Just after the opening.

    *)
  2. suffix : Ocamlformat_stdlib.string;
    (*

    Just before the closing.

    *)
  3. kind : decoded_kind;
}
val decode : parse_comments_as_doc:Ocamlformat_stdlib.bool -> t -> decoded
OCaml

Innovation. Community. Security.