lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Thu, Aug 28, 2014 at 9:35 AM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
> LDoc comes closest, but its sigils annoy me,

Believe me, they annoy me too ;)

There is an experimental 'colon' mode in ldoc, e.g.

https://github.com/stevedonovan/LDoc/blob/master/tests/styles/colon.lua

--- first useless function.
-- Optional type specifiers are allowed in this format.
-- As an extension, '?T' is short for '?nil|T'.
-- Note how these types are rendered!
-- string: name
-- int: age
-- ?person3: options
-- treturn: ?table|string
function one (name,age,options)
end

So, less @ signs.

Of course, LDoc only really requires that the first comment has at
least three dashes, and the first sentence is treated as the summary.
 E.g. how the Lua standard functions are marked up (I inherited these
files from mitchel's Textadept project):

https://github.com/stevedonovan/LDoc/blob/master/ldoc/builtin/math.lua

It is possible to write scripts that extract these summaries and
function names from the internal representation.

steve d.