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

@ -201,9 +201,9 @@ local function get_function_info (f)
end
if info.builtin and LIBRARY[f] then
info.name = LIBRARY[f].name
info.params = LIBRARY[f].params
info.doc = LIBRARY[f].doc
info.name = LIBRARY[f].name
info.params[1] = LIBRARY[f].params
info.doc = LIBRARY[f].doc
end
return info
@ -605,7 +605,7 @@ end
local function pretty_format (value, options)
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'
return format_value(value, options, 0)
end

View File

@ -335,7 +335,7 @@ format_test {
format_test {
input = string.byte,
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',
}
--------------------------------------------------------------------------------