Is there a standard for documenting the arguments to tables as
function arguments? for example
function my_constructor(init)
-- use init table to set variables of object we're going to create
local m = {}
-- set m with init fields
return m
end
my_constructor{
key1 = value1,
key2 = value2
}
I see @field, but that only seems to work for documenting actual
tables, not tables as arguments.
I would propose
---
-- @param init.value1 Description 1
-- @param init.value2 Description 2
function my_constructor(init)
or
---
-- @field init.value1 Description 1
-- @field init.value2 Description 2
function my_constructor(init)
thanks,
wes
_______________________________________________
Kepler-Project mailing list
[email protected]
http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project
http://www.keplerproject.org/