Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
doxygen-lua/example/example.lua
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
50 lines (40 sloc)
988 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --------------------------------- | |
| --! @file | |
| --! @brief a Doxygen::Lua example | |
| --------------------------------- | |
| PARAMETER = { | |
| --! table is supported | |
| a = 1, | |
| b = 2, --! end of line comment is also supported | |
| c = 3, | |
| } | |
| --! my name | |
| AUTHOR = 'Alec Chen' | |
| --! my email | |
| EMAIL = 'alec@cpan.org' | |
| --! @brief The factorial is an example of a recursive function | |
| --! @param n a positive integer | |
| --! @return return the product of all positive integers less than or equal to n | |
| function factorial(n) | |
| x = 10 | |
| y = 20 | |
| if n == 0 then | |
| return 1 | |
| else | |
| return n * factorial(n - 1) | |
| end | |
| end | |
| --! @brief a simple function declared local | |
| local function localFunction() | |
| end | |
| --! a function namespace | |
| luaCharacter = inheritsFrom( nil, "luaCharacter" ) | |
| --! @brief luaCharacter:reset | |
| function luaCharacter:reset() | |
| end | |
| --! @brief luaCharacter:destroy | |
| function luaCharacter:destroy() | |
| end | |
| --! @brief luaCharacter:entry_point | |
| function luaCharacter:entry_point() | |
| end |