lua-users home
lua-l archive

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

On Sat, Dec 3, 2011 at 12:31 PM, Robert G. Jakabosky
<> wrote:
> code using LPeg see the example Lua code lexer & parser at [1].  Using a full
> Lua parser would allow the type info to be parsed from a Doxygen/javadoc style
> comment before the function.

This is the direction that LDoc is moving in; Fabien has introduced
the idea of tag modifiers into ldoc, and I'm currently working with a
shorthand that looks like this

--- my simple function.
-- @tparam number a
-- @tparam string b
-- @tparam int c
function simple (a, b, c)

The main motivation is for better static analysis of large Lua
programs, (as well as obviously clearer docs) but the information can
definitely be re-used for dynamic type checks.

steve d.