package reason

  1. Overview
  2. Docs
Reason: Syntax & Toolchain for OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

reason-3.7.0.tgz
sha256=0fab083e9b39415b6a7fc96eb25ea9aa1a8e0a7fae2ae29b1cf7da0eaf5ef86a
md5=7eb8cbbff8565b93ebfabf4eca7254d4

doc/reason.ocaml-migrate-parsetree/Reason_migrate_parsetree/Ast_407/Docstrings/index.html

Module Ast_407.Docstrings

Docstrings

type docstring

Documentation comments

val docstring : string -> Location.t -> docstring

Create a docstring

val docstring_body : docstring -> string

Get the text of a docstring

val docstring_loc : docstring -> Location.t

Get the location of a docstring

Items

The docs type represents documentation attached to an item.

type docs = {
  1. docs_pre : docstring option;
  2. docs_post : docstring option;
}
val empty_docs : docs
val docs_attr : docstring -> Parsetree.attribute

Convert item documentation to attributes and add them to an attribute list

Fields and constructors

The info type represents documentation attached to a field or constructor.

type info = docstring option
val empty_info : info
val info_attr : docstring -> Parsetree.attribute

Convert field info to attributes and add them to an attribute list

Unattached comments

The text type represents documentation which is not attached to anything.

type text = docstring list
val empty_text : text
val empty_text_lazy : text Lazy.t
val text_attr : docstring -> Parsetree.attribute

Convert text to attributes and add them to an attribute list

OCaml

Innovation. Community. Security.