Skip to content
Tim Diels edited this page Mar 4, 2014 · 8 revisions

LDocGen is a documentation generator for lua written for CorsixTH.

Install dependencies

  • luafilesystem (LFS)
  • LPeg (Pattern matching library for lua)

Dependencies can be installed with (on linux, at least):

luarocks install luafilesystem
luarocks install lpeg

Arch-linux

Install luarocks for lua 5.2 as LDocGen will be ran with lua v5.2

pacman -S lua luarocks

LDocGen syntax

LDocGen is similar to DoxyGen, though more limited. (DoxyGen doesn't support lua.)

Syntax explained by example:

--! Description of func3 (There's no distinction between short/long description)
--! Continuation of description
void func3();

--! Supports the class construct used in CorsixTH
class "GameUI" (UI);

//! Describe func4
//!param x X coord. When negative
//!  the function will also peel a banana.
//!  This is still more info about param x.
//!param y Y coord
void func4(int x, int y);
Clone this wiki locally