reasonml / reason

Simple, fast & type safe code that leverages the JavaScript & OCaml ecosystems
http://reasonml.github.io
MIT License
10.12k stars 428 forks source link

Floating doc comments /** */ should become ocaml.text for odoc #2601

Closed jordwalke closed 4 years ago

jordwalke commented 4 years ago

This allows Reason to be used with odoc such that floating doc comments become the main odoc documentation header for a module.

/**
 * This is a floating doc comment because it has a semicolon. That means it doesn't attach to the binding below it.
 */;

let x = "hello";

This is missing a test case, which is a little hard to test since it prints the same as it parses, without guarantee that it actually becomes ocaml.text in the AST.