0 downloads 1 view Nov 15, 2026
profile

doxGen by RedTech0

project thumbnail

Dox Gen

this is a simple documentation generator

Usage

just put documentation above your code like:

example.lua:

--- this is a description
---     even preserves formatting
---@param param1 string this is a parameter description
---@param param2 table|nil this parameter has two possible types
---@param param3 string|nil|number|table this is also possible
---@return string of course there is a return type
---@return table|number even allows a second return value
---@example print("examples")
---@example print("go here")
---@explanation prints:
---@explanation examples
---@explanation go here
function someMethod(param1, param2, param3)
    --just imagine there is some code here that makes it work
    return aString, tableOrNumber
end

and get out:


example

someMethod(param1, param2, param3)

Description:

this is a description
even preserves formatting

Parameters:

(string) param1: this is a parameter description
(table|nil) param2: this parameter has two possible types
(string|nil|number|table) param3: this is also possible

Returns:

(string) of: course there is a return type
(table|number) even: allows a second return value

Example:

print("examples")
print("go here")

Explanation:

prints:
examples
go here


Annotations

List of them

  • just '---' is a description and the start of any instruction
  • '@param' adds an input parameter
  • '@return' adds an output value
  • '@example' adds an example line
  • '@explanation' adds an explanation below the example
  • @param

    put

    ---@param <name> <type> <description>

    let's put it in practice
    e.g:

    ---@param fileName string this is the file this functions scans

    or

    ---@param tags table|nil a table of tags you would like to add can also be nil

    @return

    put

    ---@return <tape> <name> <description>

    again in practice
    e.g:

    ---@return number temp this is the temperature calculated

    and they can also have multiple types and even multiple variables that are returned by stacking:

    ---@return number temp this is the temperature calculated
    ---@return string|nil state this is the state of the matirale at that temp

    @example

    this is used by writing direct lua

    ---@example <lua line>

    e.g:

    --@example --use methods like this
    --@example local value = myFunc(io.read())

    @explanation

    this is kind of a sup chapter of example cause it only works with it

    ---@explanation <some text explaining the code chunk above>

    e.g

    ---@explanation in the example we get a value from the user and process it in myFunc

    important

    local functions will not be documented as they are lua's private methods
    also definitions via don't work

    vairable = function() end

    what does work is

    local table = {}
    
    function table.method()
    end
    	
    	
    	wget run https://pinestore.cc/d/282
    	
    
    Git Repository
    project screenshot project screenshot project screenshot
    comments
    You can login with Discord to leave comments and reply to others!
    There are no comments yet