ldoc
ldoc copied to clipboard
Generate doc pages for files with no annotations?
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 :)
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)
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.
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!