2012-03-04 17:57:17 +01:00
|
|
|
-----------------------
|
|
|
|
-- Module using tparam for typed parameters.
|
|
|
|
--
|
|
|
|
-- @module types
|
|
|
|
|
|
|
|
--- has typed parameters, `string` and `int`.
|
|
|
|
-- And never forget `E = m*c^2`.
|
2012-03-05 14:34:16 +01:00
|
|
|
-- Reference to `two.md.First`
|
2012-03-04 17:57:17 +01:00
|
|
|
--
|
|
|
|
-- A reference to `mydata`.
|
|
|
|
-- @string name
|
|
|
|
-- @int age
|
2012-03-17 11:17:22 +01:00
|
|
|
-- @treturn mydata
|
2012-03-04 17:57:17 +01:00
|
|
|
function _M.first (name,age)
|
|
|
|
|
|
|
|
end
|
|
|
|
|
2012-03-17 11:17:22 +01:00
|
|
|
--- simple function returning something
|
|
|
|
-- @return bonzo dog!
|
|
|
|
function _M.simple()
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
2012-03-04 17:57:17 +01:00
|
|
|
--- a table of this module.
|
|
|
|
-- @table mydata
|
|
|
|
_M.mydata = {
|
|
|
|
one = 1, -- alpha
|
|
|
|
two = 2, -- beta
|
|
|
|
}
|
2012-03-06 09:41:19 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|