ldoc icon indicating copy to clipboard operation
ldoc copied to clipboard

Generate doc pages for files with no annotations?

Open hishamhm opened this issue 11 years ago • 3 comments
trafficstars

Is it possible to generate LDoc HTML pages for files/projects containing functions with no annotations?

They would amount to HTML files with lists of public functions of a module. Is it possible? If not, here's my wishlist item :)

hishamhm avatar Dec 18 '13 16:12 hishamhm

Sorry Hisham, I've been neglecting my projects with this new job and new house. I remember us discussing this; the basic problem is that ldoc is looking for comments, so we'll need an alternative parser which triggers on keywords like 'function' and re-uses as much of the regular parser code. Of course, such modules may contain functions with regular comments before them - these should be used if possible (this is all that godoc requires of files, for instance)

stevedonovan avatar Oct 12 '14 16:10 stevedonovan

Oh, I thought it already parsed those things, since it does a good job on detecting when arguments documented don't match the code. I see the difficulty then.

hishamhm avatar Oct 12 '14 16:10 hishamhm

It's not as difficult as I thought. We need a mode in which ldoc keeps track of all top-level comments, and triggers on explicit function keywords. Should be separated out because current parser is getting too hairy and messy! This is a useful feature because a lot of people don't dig annotations, and yet like commenting functions in an informal way. And yes - LuaRocks could exploit this!

stevedonovan avatar Oct 12 '14 17:10 stevedonovan