On Fri, May 24, 2013 at 11:31 AM, Bernd Eggink
<monoped@sudrala.de> wrote:
Anyway, thanks for ldoc and the very good documentation!
Cool - but I should make it totally obvious where to find the docs!
There is one thing I couldn't figure out, however. I want to introduce "Object" as a new type tag, so that
--- Function description
-- @treturn Object The created object
blah = function() ...
makes "Object" a link to a description of the object's structure.
There are a number of ways. If Object is just a table, then add a named table to that module:
--- About Object.
-- @field name name of person
-- @field age age of person
-- @table Object
That's pretty much how it was done in LuaDoc (except for the @table shortcut meaning @class table/@name Object)
If it's a 'class', then declare it with the @type tag (we can't use @class because of LuaDoc compatibility)
You can of course use '@tfield string' or even directly say '@string' like for function parameters.
steve d.