Closed olbat closed 5 years ago
Note: tests are working fine but I didn't manage to get it working with a real example yet, I'm waiting for your feedbacks on the idea of this PR before investigating further.
Also, this change depends on crystal-lang/clang.cr#7.
(I think that the failed CI job should just be restarted for it to pass)
I was able to try out this branch and it was able to extract some of the comments from my header file 👍. It doesn't get all of them but that might be due to multiple valid comment formats in the example I tried.
@zph so far I could only parse Doxygen comments but I think there might be an option somewhere to make it possible to parse every type of comments because there are some tests for that in LLVM sources.
Is it ready to be merged, are still some stuffs to be fixed/improved?
This change introduces a new option to import C doctrings comments at parsing time. It also introduce a new "import_docstrings" parameter to import C doctrings as Crystal comments when generating a lib.
This parameter can take two values: "brief" to extract the brief part of doctrings or "full" to extract the whole docstring 1,2.
A bunch of changes have been made to the core lib to make it possible: