File luadoc/taglet/standard.lua

Functions

class_iterator (t, class) Creates an iterator for an array base on a class type.
check_function (line) Checks if the line contains a function definition
check_module (line, currentmodule) Checks if the line contains a module definition.
parse_summary (description) Extracts summary information from a description.
parse_code (f, line, modulename)
parse_comment (block) Parses the information inside a block comment
parse_block (f, line, modulename) Parses a block of comment, started with ---.
parse_file (filepath, doc) Parses a file documented following luadoc format.
file (filepath, doc) Checks if the file is terminated by ".lua" or ".luadoc" and calls the function that does the actual parsing
directory (path, doc) Recursively iterates through a directory, parsing each file


Functions

class_iterator (t, class)
Creates an iterator for an array base on a class type.

Parameters

  • t: array to iterate over
  • class: name of the class to iterate over
check_function (line)
Checks if the line contains a function definition

Parameters

  • line: string with line text

Return value:

function information or nil if no function definition found
check_module (line, currentmodule)
Checks if the line contains a module definition.

Parameters

  • line: string with line text
  • currentmodule: module already found, if any

Return value:

the name of the defined module, or nil if there is no module definition
parse_summary (description)
Extracts summary information from a description. The first sentence of each doc comment should be a summary sentence, containing a concise but complete description of the item. It is important to write crisp and informative initial sentences that can stand on their own

Parameters

  • description: text with item description

Return value:

summary string or nil if description is nil
parse_code (f, line, modulename)

Parameters

  • f: file handle
  • line: current line being parsed
  • modulename: module already found, if any
parse_comment (block)
Parses the information inside a block comment

Parameters

  • block: block with comment field

Return value:

block parameter
parse_block (f, line, modulename)
Parses a block of comment, started with ---. Read until the next block of comment.

Parameters

  • f: file handle
  • line: being parsed
  • modulename: module already found, if any
parse_file (filepath, doc)
Parses a file documented following luadoc format.

Parameters

  • filepath: full path of file to parse
  • doc: table with documentation

Return value:

table with documentation
file (filepath, doc)
Checks if the file is terminated by ".lua" or ".luadoc" and calls the function that does the actual parsing

Parameters

  • filepath: full path of the file to parse
  • doc: table with documentation

Return value:

table with documentation See also: parse_file
directory (path, doc)
Recursively iterates through a directory, parsing each file

Parameters

  • path: directory to search
  • doc: table with documentation

Return value:

table with documentation

Valid XHTML 1.0!