package ocamlformat-mlx-lib
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=6a40faa182faee55f32bc92387b7e7f97818e160e0f4ef0e0032c0b8b70b86d1
sha512=7df487ebdcddff3529886e034fa9d5476c765c60926b11b8d86fb0e42bea3ee41f693c898e7f95bfc19ca9fa0116825c040a3e027c1e3b7505ebe6c6508540ec
doc/ocamlformat-mlx-lib.odoc_parser/Ocamlformat_odoc_parser/Odoc_parser/index.html
Module Ocamlformat_odoc_parser.Odoc_parser
Source
Parser for ocamldoc formatted comments.
type t
is the result of parsing.
parse_comment ~location ~text
parses text
as an ocamldoc formatted string. The parser will try to recover from any invalid syntax encountered, and therefore this will always produce a result without raising exceptions with zero or more warnings. The location passed in should represent the start of the content of the documentation comment - so for a line such as
(** A comment starting in the first column (0) *)
the location should represent the space immediately before the A
, so the in the 4th column (e.g. {... pos_bol=0; pos_cnum=3 }
)
Helper function to turn the internal representation of positions back into the usual representation in the Lexing module. Note that this relies on the information passed in parse_comment
, and hence requires the result of that call in addition to the Loc.point
being converted.