module Docstrings:sig
..end
val init : unit -> unit
val warn_bad_docstrings : unit -> unit
type
docstring
val docstring : string -> Location.t -> docstring
val register : docstring -> unit
val docstring_body : docstring -> string
val docstring_loc : docstring -> Location.t
These functions are used by the lexer to associate docstrings to
the locations of tokens.
val set_pre_docstrings : Lexing.position -> docstring list -> unit
val set_post_docstrings : Lexing.position -> docstring list -> unit
val set_floating_docstrings : Lexing.position -> docstring list -> unit
val set_pre_extra_docstrings : Lexing.position -> docstring list -> unit
val set_post_extra_docstrings : Lexing.position -> docstring list -> unit
The Docstrings.docs
type represents documentation attached to an item.
type
docs = {
|
docs_pre : |
|
docs_post : |
val empty_docs : docs
val docs_attr : docstring -> Parsetree.attribute
val add_docs_attrs : docs -> Parsetree.attributes -> Parsetree.attributes
val symbol_docs : unit -> docs
val symbol_docs_lazy : unit -> docs Lazy.t
val rhs_docs : int -> int -> docs
val rhs_docs_lazy : int -> int -> docs Lazy.t
val mark_symbol_docs : unit -> unit
val mark_rhs_docs : int -> int -> unit
The Docstrings.info
type represents documentation attached to a field or
constructor.
typeinfo =
docstring option
val empty_info : info
val info_attr : docstring -> Parsetree.attribute
val add_info_attrs : info -> Parsetree.attributes -> Parsetree.attributes
val symbol_info : unit -> info
val rhs_info : int -> info
The Docstrings.text
type represents documentation which is not attached to
anything.
typetext =
docstring list
val empty_text : text
val empty_text_lazy : text Lazy.t
val text_attr : docstring -> Parsetree.attribute
val add_text_attrs : text -> Parsetree.attributes -> Parsetree.attributes
val symbol_text : unit -> text
val symbol_text_lazy : unit -> text Lazy.t
val rhs_text : int -> text
val rhs_text_lazy : int -> text Lazy.t
There may be additional text attached to the delimiters of a block
(e.g. struct
and end
). This is fetched by the following
functions, which are applied to the contents of the block rather
than the delimiters.
val symbol_pre_extra_text : unit -> text
val symbol_post_extra_text : unit -> text
val rhs_pre_extra_text : int -> text
val rhs_post_extra_text : int -> text