Package list lua-ldoc / 5e18d2a
check builtin references. Builtin files are now all requireable (without module) Steve Donovan 8 years ago
11 changed file(s) with 44 addition(s) and 13 deletion(s). Raw diff Collapse all Expand all
00 --- creating and controlling coroutines.
1 -- @module coroutine
12
2 module 'coroutine'
3 local coroutine = {}
34
45 ---
56 -- Creates a new coroutine, with body `f`. `f` must be a Lua
4546 -- `yield` are passed as extra results to `resume`.
4647 function coroutine.yield(...) end
4748
49 return coroutine
00 --- getting runtime debug information.
1 -- @module debug
12
2 module 'debug'
3
3 local debug = {}
44 ---
55 -- Enters an interactive mode with the user, running each string that
66 -- the user enters. Using simple commands and other debug facilities,
120120 -- with the given index. Otherwise, it returns the name of the upvalue.
121121 function debug.setupvalue(func, up, value) end
122122
123 return debug
9090 end
9191 end
9292 if tables[tbl] then -- function inside standard Lua table
93 local t = rawget(_G,tbl) -- do a quick sanity check
94 if not rawget(t,name) then
95 return nil
96 end
9397 name = tbl..'.'..name
9498 href = fun_ref..name
9599 elseif xlibs[tbl] then -- in external libs, use LDoc style
100 local t = require('ldoc.builtin.'..tbl)
101 if not rawget(t,name) then
102 return nil
103 end
96104 href = xlib_url..xlibs[tbl]..'#'..name
97105 name = tbl..'.'..name
98106 else
00 --- Reading and Writing Files.
1 -- @module io
12
2 module 'io'
3 local io = {}
34
45 ---
56 -- Equivalent to `file:close()`. Without a `file`, closes the default
154155 -- `string.format` before `write`.
155156 function file:write(...) end
156157
158 return io
00 --- File and Directory manipulation
1 -- @module lfs
12
2 module 'lfs'
3 local lfs = {}
34
45 ---
56 -- Returns a table with the file attributes corresponding to filepath (or nil
7273 -- and its length; both should be numbers.
7374 -- Returns true if the operation was successful; in case of error, it returns
7475 -- nil plus an error string.
75 function lfs.lock(filehandle, mode, start, length)
76 function lfs.lock(filehandle, mode, start, length) end
7677
7778 ---
7879 -- Creates a new directory. The argument is the name of the new directory.
119120 -- Returns true if the operation was successful; in case of error, it returns
120121 -- nil plus an error string.
121122 function lfs.unlock(filehandle, start, length) end
123
124 return lfs
00 --- LPeg PEG pattern matching.
1
2 module 'lpeg'
1 -- @module lpeg
2
3 local lpeg = {}
34
45 ---
56 -- The matching function. It attempts to match the given pattern against the
208209 -- Any extra values returned by the function become the values produced by the
209210 -- capture.
210211 function lpeg.Cmt(patt, function) end
212
213 return lpeg
00 --- standard mathematical functions.
1 -- @module math
12
2 module 'math'
3 local math = {}
34
45 ---
56 -- Returns the absolute value of `x`.
139140 -- Returns the hyperbolic tangent of `x`.
140141 function math.tanh(x) end
141142
143 return math
00 --- Operating System facilities like date, time and program execution.
1 -- @module os
12
2 module 'os'
3 local os = {}
34
45 ---
56 -- Returns an approximation of the amount in seconds of CPU time used by
107108 -- removes the file when the program ends.
108109 function os.tmpname() end
109110
111 return os
00 --- controlling how `require` finds packages.
1 -- @module package
12
2 module 'package'
3 local package = {}
34
45 ---
56 -- The path used by `require` to search for a C loader.
9293 -- environment. To be used as an option to function `module`.
9394 function package.seeall(module) end
9495
96 return package
00 --- string operations like searching and matching.
1 -- @module string
12
2 module 'string'
3 local string = {}
34
45 ---
56 -- Returns the internal numerical codes of the characters `s[i]`, `s[i+1]`,
169170 -- definition of what a lowercase letter is depends on the current locale.
170171 function string.upper(s) end
171172
173 return string
174
00 --- manipulating Lua tables.
1 -- @module table
12
2 module 'table'
3 local table = {}
34
45 ---
56 -- Given an array where all elements are strings or numbers, returns
3839 -- (so that `not comp(a[i+1],a[i])` will be true after the sort). If `comp`
3940 -- is not given, then the '<' operator will be used.
4041 function table.sort(table , comp) end
42
43 return table