Page 1 of 1

LöveLëtter - Object-oriented LuaDoc.

Posted: Mon Jan 24, 2011 11:30 am
by An00biS
Hello all lövers,

though Lua isn't technically object oriented, I've been allways using it that way. And because I have also experience with Java and C++, I've always wished to document my Lua code the same way as I did with those languages. But LuaDoc didn't help me very much with it - it was created with structured code in mind and to smuggle classes in, one has to do workarounds like declaring tables named classes or prefixing function docs with class name. But I wasn't satisfied with this.

And, there were other things I thought LuaDoc could do better. For instance, when there's parsing error, you don't want to see the traceback of luadoc's internals, you want to see file name and line number, right?

For all these reasons, I got the idea to start my own documentation tool, one that would do things my way. As a first step, I checked LuaDoc's page to see how hard it would be to alter it the way I wanted. Turned out it's actually quite easy - the authors had it in mind and made luadoc modular. The core part actually just loads files and passes them to 'doclet' and 'taglet', which do the dirty work. So, I started working on my own set of these. And because I'm lazy, I started the easy way - I copied luadoc's default taglet/doclet and began hacking on it.

I called the project LöveLëtter and I've hosted it on github: https://github.com/An00biS/LoveLetter
Right now, it's actually just a proof of concept. The only extra feature is the file/line error message I mentioned above (this bugged me the most).

But what I plan to do is:
* Support declaration of classes and inheritance (that's what it's all about!)
* Make the HTML output look like LÖVE's wiki documentation - because that is object-oriented and it looks just great. This also includes data type declarations with hyperlinks to class definitions.
* Recognize MiddleClass constructs. Because MiddleClass rocks!

Be aware that LL is somewhat complicated to install and use, because I'm creating it the easy way (for me). Check the README for instructions and be patient, I'm working on it.

Hope you like the idea and the implementation doesn't exactly scare you off :megagrin:

Enjoy!

Re: LöveLëtter - Object-oriented LuaDoc.

Posted: Mon Jan 24, 2011 8:07 pm
by FierceForm
Feature recommendation: MindState support.

Re: LöveLëtter - Object-oriented LuaDoc.

Posted: Mon Jan 24, 2011 9:15 pm
by kikito
An00biS wrote: * Recognize MiddleClass constructs. Because MiddleClass rocks!
:) Like new zealand! You are very kind, thanks!

I've been looking for something like this for some time. I'll give it a run next weekend.

By the way, what are your thoughts on super?
FierceForm wrote:Feature recommendation: MindState support.
A warning: MindState is deprecated. The up-to-date version is called Stateful, and it resides inside middleclass.extras .

Re: LöveLëtter - Object-oriented LuaDoc.

Posted: Tue Jan 25, 2011 3:15 am
by FierceForm
kikito wrote:
FierceForm wrote:Feature recommendation: MindState support.
A warning: MindState is deprecated. The up-to-date version is called Stateful, and it resides inside middleclass.extras .
=O I'll remember that.

Re: LöveLëtter - Object-oriented LuaDoc.

Posted: Tue Jan 25, 2011 9:09 am
by An00biS
kikito wrote:... I'll give it a run next weekend.
Good, by then it could already have some features :)
FierceForm wrote:Feature recommendation...
I'm not familiar with this one yet. And right now I'm all hasty about class-support, so I'll leave this one for later time.