LöveLëtter - Object-oriented LuaDoc.

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
An00biS
Prole
Posts: 21
Joined: Thu Nov 13, 2008 9:55 am
Location: mapy.cz/?query=rajhrad

LöveLëtter - Object-oriented LuaDoc.

Post 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!
User avatar
FierceForm
Prole
Posts: 10
Joined: Sat Jan 22, 2011 4:35 pm

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

Post by FierceForm »

Feature recommendation: MindState support.
-FierceForm
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

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

Post 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 .
When I write def I mean function.
User avatar
FierceForm
Prole
Posts: 10
Joined: Sat Jan 22, 2011 4:35 pm

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

Post 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.
-FierceForm
An00biS
Prole
Posts: 21
Joined: Thu Nov 13, 2008 9:55 am
Location: mapy.cz/?query=rajhrad

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

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests