Hi fellows,

Currently in master, we generate documentation for the C-Lua API from
the source code comments founds in the various C file.
That works fine.

However, starting with what I'm doing in 'next' branch, things are
utterly broken. I wrote a more dynamic system, which makes the
extraction of comments harder.

For example you do not have a luaA_myclass_index() with all property
listed. You rather add properties to a class structure, and then
all objects of that class will that property.

So it was easy to extract things from:
/** My object.
 * \lfield name The name of the object.
 */
int
luaA_object_index(lua_State *L)
...

--> @class object 
    @field name The name of the object.


But it's harder from:
    /** Set timer's timeout. */
    luaA_class_add_property(&timer_class, A_TK_TIMEOUT, "timeout", 
                            (lua_class_propfunc_t) timer_set_timeout, 
                            (lua_class_propfunc_t) timer_get_timeout, 
                            (lua_class_propfunc_t) timer_set_timeout); 

(A good and small example is timer.c from the next branch.)

If I've a lot of time, I could probably restart hacking
fake-lua-src.lua, but I unfortunately do not have enough time for that,
nor the willingness.

I'd like to hear suggestions from you guys about this. I still believe
that keeping the C-Lua API documentation inside the C source files is a
good idea, because it really prevents forgetting to document stuff.
However, I might step back and restart writing documentation inside
fake Lua files if I really do not find another solution.

I dig a bit into doxygen output format, but I did not find something
obvious. The XML is quite fine, but does not have everything easy to
handle, and requires a lot of manual parsing.

I though about gtk-doc, but it seems very GTK+ oriented.

So ideas, suggestions or proof-of-concept are welcome.

Cheers,
-- 
Julien Danjou
// ᐰ <jul...@danjou.info>   http://julien.danjou.info
// 9A0D 5FD9 EB42 22F6 8974  C95C A462 B51E C2FE E5CD
// In the Sixth Sense, Bruce Willis is dead.

Attachment: signature.asc
Description: Digital signature

Reply via email to