I am using jsdoc toolkit for quite a while to create javascript
documentation. It's really handy, because it offers so many
possibilities to document the features of most of the complicated
constructs, which somebody is able to come up in Javaascript!
Additionally I regulary also create code in Lua [1]. This languages has
also meta methods, lexical scoping, closures and is quite difficult to
document in full extend.
So I was wondering if JsDoc Toolkit is intended to be used also for
other languages? The -nocode option, seems to be capable of commenting
code as long as it has @name.
At a first glance I thought creating a custom Walker.js would do the
trick, but I surely miss something ;). Is there any work done in this
field already?
Kind regards,
Jan
--
thanks for your kind reply.
In lua the comment blocks are made by multiline with --[[ ... ]] or a
preceding -- (per line).
Is it possible to configure that, too?
Kind regards,
Jan
==== file: animal.lua
require 'class'
--[[/**
@name Animal
@class
@description The base class for my menagerie.
*/]]
Animal = class(function(a,name)
a.name = name
end)
--[[/**
@name Dog
@class
@extends Animal
@description A canine animal.
*/]]
Dog = class(Animal)
--[[/**
@name Dog#speak
@method
@description Bark bark.
*/]]
function Dog:speak()
return 'bark'
end
====
Use the following commandline:
java -jar jsrun.jar app/run.js -t=templates/jsdoc/ -n -x=lua animal.lua
Everything should work as expected except for the syntax hiliting for
the source code views. You can disable source code hiliting by
removing that file from the plugins folder.
Regards,
Michael
> --
>
> You received this message because you are subscribed to the Google Groups
> "JsDoc Toolkit Users" group.
> To post to this group, send email to jsd...@googlegroups.com.
> To unsubscribe from this group, send email to
> jsdoc-2+u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/jsdoc-2?hl=en.
>
>
>