atilaneves / dpp

Directly include C headers in D source code
Boost Software License 1.0
230 stars 31 forks source link

Should optionally pull in function and file documentation #140

Closed Laeeth closed 3 years ago

Laeeth commented 5 years ago

So can generate D documentation if that's what is wanted

atilaneves commented 5 years ago

One isn't supposed to look at the translated source code. The documentation to be consulted should be of the original C or C++ source code.

It'd be nearly impossible to match the "documentation" (i.e. comments) with the original cursors since they their order gets changed in the process of translation (because of libclang oddities).

If original code has any documentation (probably Doxygen), then generating it from there would be the ideal.

Laeeth commented 5 years ago

Libclang can get documentation comments attached to functions.

And since dpp isn't perfect one ought to consider need to read generated source for debugging problems.

aminya commented 3 years ago

Can DPP preserve the documentation before functions? IDE's data tips rely on this documentation, and if DPP can preserve them, we will have data tips for the generated files.

/** some docs here */
void some_function()