Skip to content

Use the Odoc parser instead of Octavius #571

@Julow

Description

@Julow

Octavius is the documentation comments parser. It will be deprecated soon, in favor of Odoc.

TODO

  • Rewrite the Fmt_odoc module
    The types are different, obviously, but very similar

  • Vendor odoc sources
    Odoc's parser and model internal libraries are not released yet on opam

  • Whitespaces informations are lost
    In the AST, sentenses words are splitted and consecutive whitespaces, including newlines are represented as \Space`. Newlines can be retrieved by comparing start/end locations.
    A bit of work is required to preserve ASCII-art and fancy headers

  • Small difficulties

    • Heading labels ({0:label Heading}) are not optional in the AST and so always printed
    • Deciding between heavy and light syntax for lists should be done with a better heuristic than print-parse-compare
    • Paths_types (identifiers, references) is very complex
      We only need to convert them to strings, there is (not exported) functions to do that in Odoc's html/comment.ml

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions