luadoc: named parameters

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

luadoc: named parameters

Martin Schröder-2
Hi,
how do you document the named parameters of a function with luadoc?

---- a function
-- @param args a table with
-- @field foo some parameter
-- @field bar another parameter

doesn't produce the expected result...

Best
   Martin

Reply | Threaded
Open this post in threaded view
|

Re: luadoc: named parameters

Wesley Smith
There have been a few proposals fir documenting table argument fields, but nothing implemented as far as I know.  In the doc system for LuaAV, we simple write:

@param args Description
@param args.field Field description

You can see example output on our doc pages, particularly in the audio.def module: http://lua-av.mat.ucsb.edu/doc/index.html

wes

On Sep 21, 2010, at 7:01 AM, Martin Schröder <[hidden email]> wrote:

> Hi,
> how do you document the named parameters of a function with luadoc?
>
> ---- a function
> -- @param args a table with
> -- @field foo some parameter
> -- @field bar another parameter
>
> doesn't produce the expected result...
>
> Best
>   Martin
>

Reply | Threaded
Open this post in threaded view
|

Re: luadoc: named parameters

Martin Schröder-2
2010/9/21 Wesley Smith <[hidden email]>:
> There have been a few proposals fir documenting table argument fields, but nothing implemented as far as I know.  In the doc system for LuaAV, we simple write:
>
> @param args Description
> @param args.field Field description

Hrm. luadoc then generates the function signature as (args, args.field). :-(

Also: Is there any way to let luadoc handle utf8 in the comments?

Best
   Martin