[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: A custom type/class system with lua/luajit
- From: steve donovan <steve.j.donovan@...>
- Date: Sat, 3 Dec 2011 12:40:42 +0200
On Sat, Dec 3, 2011 at 12:31 PM, Robert G. Jakabosky
<bobby@sharedrealm.com> 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)
...
end
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.