I am writing a tool that reads an .mli file and automatically generates a binding to use the corresponding module from the Julia language.
I am using the Parse.interface function to parse an .mli file. However, it does not retain documentation comments. Do you know of any way to parse an .mli file while keeping the comments attached to each declaration?
The standard Ocaml parser should retain doc-comments, turning then into attributes. Are you saying that that’s not happening? You can check by parsing with compiler-libs, then pretty-printing with same – you should see the doc-comment attributes.
Heh, I don’t. But I learned it by doing the experiment I suggested. Also though, I believe that this is how odoc works (last I checked, at least). I also note that this is not how ocanldoc works – it actually searches for doc-comments in the text between lexemes, etc, etc.