1
0

Expanded library.lua to include all documented standard library functions.

This commit is contained in:
Jon Michael Aanes 2016-12-31 16:50:12 +01:00
parent 961bdf4a90
commit 877c954b78
3 changed files with 737 additions and 68 deletions

File diff suppressed because it is too large Load Diff

View File

@ -202,7 +202,7 @@ local function get_function_info (f)
if info.builtin and LIBRARY[f] then if info.builtin and LIBRARY[f] then
info.name = LIBRARY[f].name info.name = LIBRARY[f].name
info.params = LIBRARY[f].params info.params[1] = LIBRARY[f].params
info.doc = LIBRARY[f].doc info.doc = LIBRARY[f].doc
end end
@ -605,7 +605,7 @@ end
local function pretty_format (value, options) local function pretty_format (value, options)
local options = options or {} local options = options or {}
options.max_depth = options.max_depth or 3--math.huge options.max_depth = options.max_depth or math.huge
options.indent = options.indent or '\t' options.indent = options.indent or '\t'
return format_value(value, options, 0) return format_value(value, options, 0)
end end

View File

@ -335,7 +335,7 @@ format_test {
format_test { format_test {
input = string.byte, input = string.byte,
options = { more_function_info = true }, options = { more_function_info = true },
expect = 'builtin function (s [, i [, j]])\n\t-- string.byte\n\t-- Returns the internal numerical codes of the characters s[i], s[i+1], ..., s[j].\n\t-- The default value for i is 1; the default value for j is i.\n\t-- Note that numerical codes are not necessarily portable across platforms.\n\n\t...\nend', expect = 'builtin function (s [, i [, j]])\n\t-- string.byte\n\t-- Returns the internal numerical codes of the characters s[i], s[i+1], ..., s[j]. The default value for i is 1; the default value for j is i.\n\t-- Note that numerical codes are not necessarily portable across platforms.\n\n\t...\nend',
} }
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------