Описание тега luadoc

NoneIs a documentation generator tool for Lua source code. It parses the declarations and documentation comments in a set of Lua source files and produces a set of XHTML pages describing the commented declarations and functions.

Overview

LuaDoc is a documentation generator tool for lua source code. It parses the declarations and documentation comments in a set of Lua source files and produces a set of xhtml pages describing the commented declarations and functions.

The output is not limited to XHTML. Other formats can be generated by implementing new doclets. The format of the documentation comments is also flexible and can be customized by implementing new taglets. Please refer to customizing section for further information.

LuaDoc is free software and uses the same license as Lua. Current version is 3.0.1. It was developed for Lua 5.1.

Download

LuaDoc can be downloaded from its Lua Forge page.

Dependencies

LuaDoc depends on two external packages:

Architecture

LuaDoc's processing can be divided in two distinct steps: parsing and generation. The parsing step take as input a set of .lua files and must produce a Documentation object. A generator takes a Documentation object as input and produces a set of output files. It's up to the generator to decide which output format it will generate.

Architecture

The parsing step is executed by a component called taglet, while the generation is handled by a component called doclet. This architecture is shown below.

Taglet

LuaDoc does not impose a documentation format. Instead, it relies on an internal representation of the documentation. This representation is described in the Documentation section. If the developer wants to use a custom documentation format the taglet component can be replaced.

Writing a new taglet is a matter a implementing a single method:

function start (files, doc)
  • files - a list of file (or directory) names.
  • doc - a preprocessed documentation object.

Doclet

The primary job of an doclet is to take a Documentation object and generate some kind of output. LuaDoc is bundled with an implementation that generates HTML files.

Writing a new doclet is a matter a implementing a single method:

function start (doc)
  • doc - a documentation object.

Credits

Tag wiki copied from LuaDoc GitHub pages