aboutsummaryrefslogtreecommitdiff
path: root/modules/lua/lua.luadoc
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2014-06-07 11:33:45 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2014-06-07 11:33:45 -0400
commite56735ed361d707618c8c45b56efffd51194ef30 (patch)
treea83ae65aa492ac5f4cf96f38d7512216901ac172 /modules/lua/lua.luadoc
parent27d8dcdf343f8109654701563d84d8ba7c1ce4a9 (diff)
downloadtextadept-e56735ed361d707618c8c45b56efffd51194ef30.tar.gz
textadept-e56735ed361d707618c8c45b56efffd51194ef30.zip
Added buffer constants to buffer LuaDoc and improved Lua tags and api generator.
Diffstat (limited to 'modules/lua/lua.luadoc')
-rw-r--r--modules/lua/lua.luadoc125
1 files changed, 69 insertions, 56 deletions
diff --git a/modules/lua/lua.luadoc b/modules/lua/lua.luadoc
index 374bfdb2..46ce6035 100644
--- a/modules/lua/lua.luadoc
+++ b/modules/lua/lua.luadoc
@@ -1,4 +1,18 @@
---
+-- Dummy table.
+-- @class table
+-- @name _G
+-- @field _G (table)
+-- A global variable (not a function) that holds the global environment
+-- (see §2.2). Lua itself does not use this variable; changing its value does
+-- not affect any environment, nor vice-versa.
+-- @field _VERSION (string)
+-- A global variable (not a function) that holds a string containing the
+-- current interpreter version. The current contents of this variable is
+-- "`Lua 5.2`".
+local _G
+
+---
-- Issues an error when the value of its argument `v` is false (i.e.,
-- nil or false); otherwise, returns all its arguments. `message` is an error
-- message; when absent, it defaults to "assertion failed!"
@@ -59,11 +73,6 @@ function dofile([filename]) end
-- message.
function error(message [, level]) end
--- * `_G._G` (table)
--- A global variable (not a function) that holds the global environment
--- (see §2.2). Lua itself does not use this variable; changing its value does
--- not affect any environment, nor vice-versa.
-
---
-- If `object` does not have a metatable, returns nil. Otherwise, if the
-- object's metatable has a `"__metatable"` field, returns the associated
@@ -237,11 +246,6 @@ function tostring(v) end
-- "`table`", "`function`", "`thread`", and "`userdata`".
function type(v) end
--- * `_G._VERSION` (string)
--- A global variable (not a function) that holds a string containing the
--- current interpreter version. The current contents of this variable is
--- "`Lua 5.2`".
-
---
-- This function is similar to `pcall`, except that it sets a new message
-- handler `msgh`.
@@ -324,7 +328,11 @@ function coroutine.yield(···) end
-- any loader for the module, then `require` raises an error.
function require(modname) end
--- * `package.config` (string)
+---
+-- Dummy module.
+-- @class table
+-- @name package
+-- @field config (string)
-- A string describing some compile-time configurations for packages. This
-- string is a sequence of lines:
-- The first line is the directory separator string. Default is '`\`' for
@@ -337,56 +345,30 @@ function require(modname) end
-- the executable's directory. Default is '`!`'.
-- The fifth line is a mark to ignore all text before it when building the
-- `luaopen_` function name. Default is '`-`'.
-
--- * `package.cpath` (string)
+-- @field cpath (string)
-- The path used by `require` to search for a C loader.
-- Lua initializes the C path `package.cpath` in the same way it initializes
-- the Lua path `package.path`, using the environment variable `LUA_CPATH_5_2`
-- or the environment variable `LUA_CPATH` or a default path defined in
-- `luaconf.h`.
-
--- * `package.loaded` (table)
+-- @field loaded (table)
-- A table used by `require` to control which modules are already loaded. When
-- you require a module `modname` and `package.loaded[modname]` is not false,
-- `require` simply returns the value stored there.
-- This variable is only a reference to the real table; assignments to this
-- variable do not change the table used by `require`.
-
----
--- Dynamically links the host program with the C library `libname`.
---
--- If `funcname` is "`*`", then it only links with the library, making the
--- symbols exported by the library available to other dynamically linked
--- libraries. Otherwise, it looks for a function `funcname` inside the library
--- and returns this function as a C function. So, `funcname` must follow the
--- `lua_CFunction` prototype (see `lua_CFunction`).
---
--- This is a low-level function. It completely bypasses the package and module
--- system. Unlike `require`, it does not perform any path searching and does
--- not automatically adds extensions. `libname` must be the complete file name
--- of the C library, including if necessary a path and an extension. `funcname`
--- must be the exact name exported by the C library (which may depend on the
--- C compiler and linker used).
---
--- This function is not supported by Standard C. As such, it is only available
--- on some platforms (Windows, Linux, Mac OS X, Solaris, BSD, plus other Unix
--- systems that support the `dlfcn` standard).
-function package.loadlib(libname, funcname) end
-
--- * `package.path` (string)
+-- @field path (string)
-- The path used by `require` to search for a Lua loader.
-- At start-up, Lua initializes this variable with the value of the
-- environment variable `LUA_PATH_5_2` or the environment variable `LUA_PATH`
-- or with a default path defined in `luaconf.h`, if those environment
-- variables are not defined. Any "`;;`" in the value of the environment
-- variable is replaced by the default path.
-
--- * `package.preload` (table)
+-- @field preload (table)
-- A table to store loaders for specific modules (see `require`).
-- This variable is only a reference to the real table; assignments to this
-- variable do not change the table used by `require`.
-
--- * `package.searchers` (table)
+-- @field searchers (table)
-- A table used by `require` to control how to load modules.
-- Each entry in this table is a *searcher function*. When looking for a
-- module, `require` calls each of these searchers in ascending order, with
@@ -423,6 +405,28 @@ function package.loadlib(libname, funcname) end
-- All searchers except the first one (preload) return as the extra value the
-- file name where the module was found, as returned by `package.searchpath`.
-- The first searcher returns no extra value.
+local package
+
+---
+-- Dynamically links the host program with the C library `libname`.
+--
+-- If `funcname` is "`*`", then it only links with the library, making the
+-- symbols exported by the library available to other dynamically linked
+-- libraries. Otherwise, it looks for a function `funcname` inside the library
+-- and returns this function as a C function. So, `funcname` must follow the
+-- `lua_CFunction` prototype (see `lua_CFunction`).
+--
+-- This is a low-level function. It completely bypasses the package and module
+-- system. Unlike `require`, it does not perform any path searching and does
+-- not automatically adds extensions. `libname` must be the complete file name
+-- of the C library, including if necessary a path and an extension. `funcname`
+-- must be the exact name exported by the C library (which may depend on the
+-- C compiler and linker used).
+--
+-- This function is not supported by Standard C. As such, it is only available
+-- on some platforms (Windows, Linux, Mac OS X, Solaris, BSD, plus other Unix
+-- systems that support the `dlfcn` standard).
+function package.loadlib(libname, funcname) end
---
-- Searches for the given `name` in the given `path`.
@@ -676,6 +680,17 @@ function table.sort(list [, comp]) end
function table.unpack(list [, i [, j]]) end
---
+-- Dummy table.
+-- @class table
+-- @name math
+-- @field huge (number)
+-- The value `HUGE_VAL`, a value larger than or equal to any other numerical
+-- value.
+-- @field pi (number)
+-- The value of 'π'.
+local math
+
+---
-- Returns the absolute value of `x`.
function math.abs(x) end
@@ -731,10 +746,6 @@ function math.fmod(x, y) end
-- absolute value of `m` is in the range *[0.5, 1)* (or zero when `x` is zero).
function math.frexp(x) end
--- * `math.huge` (number)
--- The value `HUGE_VAL`, a value larger than or equal to any other numerical
--- value.
-
---
-- Returns 'm2^e' (`e` should be an integer).
function math.ldexp(m, e) end
@@ -757,9 +768,6 @@ function math.min(x, ···) end
-- `x`.
function math.modf(x) end
--- * `math.pi` (number)
--- The value of 'π'.
-
---
-- Returns *x^y*. (You can also use the expression `x^y` to compute this
-- value.)
@@ -904,6 +912,18 @@ function bit32.rrotate(x, disp) end
function bit32.rshift(x, disp) end
---
+-- Dummy table.
+-- @class table
+-- @name io
+-- @field stderr (file)
+-- Standard error.
+-- @field stdin (file)
+-- Standard in.
+-- @field stdout (file)
+-- Standard out.
+local io
+
+---
-- Equivalent to `file:close()`. Without a `file`, closes the default
-- output file.
function io.close([file]) end
@@ -969,13 +989,6 @@ function io.popen(prog [, mode]) end
-- Equivalent to `io.input():read(···)`.
function io.read(···) end
--- * `io.stderr` (file)
--- Standard error.
--- * `io.stdin` (file)
--- Standard in.
--- * `io.stdout` (file)
--- Standard out.
-
---
-- Returns a handle for a temporary file. This file is opened in update
-- mode and it is automatically removed when the program ends.