ocaml/ocaml — pull request #51 by lpw25 (2014-05-05 00:00:51+00:00)
Title: Support parsing documentation and storing it in attributes

This patch adds a simplified reimplementation of OCamlDoc parsing to the compiler. This is used to provide a `-doc` argument to ocamlc and ocamlopt, which causes the compiler to parse documentation and store it in the AST as attributes. This means that documentation can be retrieved directly from `.cmt` files, enabling tools to easily obtain accurate documentation information.

The documentation is stored as attributes using a new kind of payload `PDoc` which containts a `Documentation.t` (based on OCamlDoc's `Odoc_types.info` type).