lua-users home
lua-l archive

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


On 24.05.2013 11:44, steve donovan wrote:

    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)

Steve,
thanks for your reply. I think I'll dive a bit deeper into the ldoc documentation first. BTW, there's a glitch in the html files. All internal anchor names in the href tags have a surplus underscore at the end, so the links in the main menu don't work. I downloaded the files and corrected that with an editor, but you might have a look at it.

Regards,
Bernd


--
http://sudrala.de