LuaD icon indicating copy to clipboard operation
LuaD copied to clipboard

automatic documentation generation

Open Trass3r opened this issue 15 years ago • 3 comments

Beware: this is just a premature thought. Every app that exposes some of its functions and classes to Lua probably wants to generate some API documentation to pass it over to the scripting team. Especially when the API is changed quite often during the development of the main app it is desirable to automate this procedure.

I'm not sure if LuaD can do anything to ease that. Of course you could output some text in the registerClass etc. functions that at least describe what functions are available but you probably can't get ahold of their ddoc comments.

Trass3r avatar Nov 22 '10 12:11 Trass3r

Don't you think it's simpler to just document those functions and classes as D documentation, then have the scripting team use the stack.d conversion rules to learn how to use it? The generated wrappers enforce a sense of type safety encoded in the D declarations, all that needs to be carefully explained if you were to generate Lua documentation ala LuaDoc.

JakobOvrum avatar Nov 22 '10 13:11 JakobOvrum

Yep, one could also tag the exported functions somehow in the ddoc comments so you can filter the results. Still one would have to manually include what the actual function name in Lua is.

Trass3r avatar Nov 22 '10 13:11 Trass3r

Yeah, but you would always have to do that.

JakobOvrum avatar Nov 22 '10 14:11 JakobOvrum