module Atd_doc:sig
..end
type foo = Bar of int
<doc text="This type represents foo values.">
This allows code generators to inject the documentation into the generated code.
<doc> nodes that appear in the following positions should be taken into account by code generators that care about documentation:
Currently only one format called "text" is supported:
{{ }}
can be used to enclose inline verbatim text.{{{ }}}
can be used to enclose verbatim text where whitespace
is preserved.\
, {{
and {{{
.
In inline verbatim text, special sequences are \
and }}
.
In verbatim text, special sequences are \
and }}}
.typeinline =
[ `Code of string | `Text of string ]
`Text
is regular text. `Code
is text that was enclosed
within {{ }}
and should be rendered using the
same fixed-width font used in all verbatim text.typeblock =
[ `Paragraph of inline list | `Pre of string ]
`Paragraph
is a regular paragraph.
`Pre
is preformatted text that was enclosed
within {{{ }}}
and should be rendered using a fixed-width
font preserving all space and newline characters.typedoc =
[ `Text of block list ]
val parse_text : Atd_ast.loc -> string -> doc
val get_doc : Atd_ast.loc -> Atd_ast.annot -> doc option
val html_of_doc : doc -> string