diff options
-rw-r--r-- | server/libs/lua/basic.lni | 88 | ||||
-rw-r--r-- | server/libs/lua/debug.lni | 16 | ||||
-rw-r--r-- | server/libs/lua/math.lni | 17 | ||||
-rw-r--r-- | server/libs/lua/table.lni | 1 | ||||
-rw-r--r-- | server/locale/en-US/libs/lua/basic.lni | 18 | ||||
-rw-r--r-- | server/locale/en-US/libs/lua/debug.lni | 6 | ||||
-rw-r--r-- | server/locale/en-US/libs/lua/math.lni | 6 | ||||
-rw-r--r-- | server/locale/zh-CN/libs/lua/basic.lni | 18 | ||||
-rw-r--r-- | server/locale/zh-CN/libs/lua/debug.lni | 6 | ||||
-rw-r--r-- | server/locale/zh-CN/libs/lua/math.lni | 6 |
10 files changed, 182 insertions, 0 deletions
diff --git a/server/libs/lua/basic.lni b/server/libs/lua/basic.lni index d1c272b5..51c6fb03 100644 --- a/server/libs/lua/basic.lni +++ b/server/libs/lua/basic.lni @@ -110,6 +110,16 @@ optional = 'self' [_G] type = 'table' +[getfenv] +version = 'Lua 5.1' +[[.args]] +name = f +type = function +optional = after +default = 1 +[[.returns]] +type = table + [getmetatable] [[.args]] name = 'object' @@ -152,6 +162,7 @@ type = 'integer' default = 0 [load] +name = 'load' [[.args]] name = 'chunk' type = {'string', 'function'} @@ -188,6 +199,26 @@ name = 'mode' enum = 'bt' default = true +['load Lua 5.1'] +name = 'load' +version = {'Lua 5.1'} +[[.args]] +name = 'func' +type = 'function' +`````````` +name = 'chunkname' +type = 'string' +[[.returns]] +type = 'function' +args = { + 1 = { + type = '...' + }, +} +`````````` +name = 'error_message' +type = 'string' + [loadfile] special = 'loadfile' [[.args]] @@ -223,6 +254,53 @@ name = 'mode' enum = 'bt' default = true +['loadfile Lua 5.1'] +name = 'loadfile' +special = 'loadfile' +version = 'Lua 5.1' +[[.args]] +name = 'filename' +type = 'string' +optional = 'after' +[[.returns]] +type = 'function' +args = { + 1 = { + type = '...' + }, +} +`````````` +name = 'error_message' +type = 'string' + +[loadstring] +version = 'Lua 5.1' +[[.args]] +type = string +````````` +name = chunkname +type = string +optional = after +[[.returns]] +type = 'function' +args = { + 1 = { + type = '...' + }, +} +`````````` +name = 'error_message' +type = 'string' + +[module] +version = 'Lua 5.1' +[[.args]] +name = name +type = string +`````````` +type = '...' +optional = after + [next] [[.args]] name = 'table' @@ -337,6 +415,16 @@ enum = '#' name = 'index' code = 'integer' +[setfenv] +version = 'Lua 5.1' +[[.args]] +name = f +type = function/integer +````````` +type = table +[[.returns]] +type = function + [setmetatable] special = 'setmetatable' [[.args]] diff --git a/server/libs/lua/debug.lni b/server/libs/lua/debug.lni index 15752446..74d50161 100644 --- a/server/libs/lua/debug.lni +++ b/server/libs/lua/debug.lni @@ -22,6 +22,13 @@ parent = { ["debug.debug"] name = 'debug' +[getfenv] +version = 'Lua 5.1' +[[.args]] +name = o +[[.returns]] +type = table + [gethook] [[.args]] type = 'thread' @@ -127,6 +134,15 @@ type = 'any' `````````` type = 'boolean' +[setfenv] +version = 'Lua 5.1' +[[.args]] +name = 'object' +`````````` +type = 'table' +[[.returns]] +name = 'object' + [sethook] [[.args]] type = 'thread' diff --git a/server/libs/lua/math.lni b/server/libs/lua/math.lni index 4f807b0c..20f75315 100644 --- a/server/libs/lua/math.lni +++ b/server/libs/lua/math.lni @@ -167,6 +167,23 @@ default = 'e' [[.returns]] type = 'number' +['log Lua 5.1'] +name = log +version = {'Lua 5.1'} +[[.args]] +name = 'x' +type = 'number' +[[.returns]] +type = 'number' + +[log10] +version = 'Lua 5.1' +[[.args]] +name = 'x' +type = 'number' +[[.returns]] +type = 'number' + [max] [[.args]] name = 'x' diff --git a/server/libs/lua/table.lni b/server/libs/lua/table.lni index b3f3f113..5266cb41 100644 --- a/server/libs/lua/table.lni +++ b/server/libs/lua/table.lni @@ -53,6 +53,7 @@ name = 'value' type = 'any' [move] +version = {'Lua 5.3', 'Lua 5.4'} [[.args]] name = 'a1' type = 'table' diff --git a/server/locale/en-US/libs/lua/basic.lni b/server/locale/en-US/libs/lua/basic.lni index e9d17979..9c982fbb 100644 --- a/server/locale/en-US/libs/lua/basic.lni +++ b/server/locale/en-US/libs/lua/basic.lni @@ -89,6 +89,9 @@ description = 'Terminates the last protected function called and returns message [_G] description = 'Holds the global environment.' +[getfenv] +description = 'Returns the current environment in use by the function. `f` can be a Lua function or a number that specifies the function at that stack level.' + [getmetatable] description = 'Returns the metatable of the given object.' @@ -117,6 +120,9 @@ name = 'mode' enum = 'bt' description = 'Both binary and text.' +['load Lua 5.1'] +description = 'Loads a chunk using function `func` to get its pieces. Each call to `func` must return a string that concatenates with previous results.' + [loadfile] description = 'Loads a chunk from file.' [[.enums]] @@ -132,6 +138,15 @@ name = 'mode' enum = 'bt' description = 'Both binary and text.' +['loadfile Lua 5.1'] +description = 'Loads a chunk from file `filename` or from the standard input, if no file name is given.' + +[loadstring] +description = 'Loads a chunk from the given string.' + +[module] +description = 'Creates a module' + [next] description = 'Returns the next index of the table and its associated value.' @@ -173,6 +188,9 @@ name = 'index' code = 'integer' description = 'Returns all arguments after number `index`.' +[setfenv] +description = 'Sets the environment to be used by the given function. `f` can be a Lua function or a number that specifies the function at that stack level.' + [setmetatable] description = 'Sets the metatable for the given table.' diff --git a/server/locale/en-US/libs/lua/debug.lni b/server/locale/en-US/libs/lua/debug.lni index 32d1da68..42422ae6 100644 --- a/server/locale/en-US/libs/lua/debug.lni +++ b/server/locale/en-US/libs/lua/debug.lni @@ -1,6 +1,9 @@ ["debug.debug"] description = 'Enters an interactive mode with the user, running each string that the user enters.' +[getfenv] +description = 'Returns the environment of object `o` .' + [gethook] description = 'Returns the current hook settings of the thread.' @@ -57,6 +60,9 @@ to the userdata `u` plus a boolean, `false` if the userdata does not have that value. ]] +[setfenv] +description = 'Sets the environment of the given `object` to the given `table` .' + [sethook] description = 'Sets the given function as a hook.' [[.enums]] diff --git a/server/locale/en-US/libs/lua/math.lni b/server/locale/en-US/libs/lua/math.lni index 0a89176e..e5bfb122 100644 --- a/server/locale/en-US/libs/lua/math.lni +++ b/server/locale/en-US/libs/lua/math.lni @@ -46,6 +46,12 @@ description = 'A value larger than any other numeric value.' [log] description = 'Returns the logarithm of `x` in the given base.' +['log Lua 5.1'] +description = 'Returns the natural logarithm of `x` .' + +[log10] +description = 'Returns the base-10 logarithm of x.' + [ldexp] description = 'Returns `m * (2 ^ e)` .' diff --git a/server/locale/zh-CN/libs/lua/basic.lni b/server/locale/zh-CN/libs/lua/basic.lni index 8d6c25a6..44497d54 100644 --- a/server/locale/zh-CN/libs/lua/basic.lni +++ b/server/locale/zh-CN/libs/lua/basic.lni @@ -89,6 +89,9 @@ description = '中止上一次保护函数调用, 将错误对象 message 返 [_G] description = '内部储存有全局环境。' +[getfenv] +description = '返回给定函数的环境。`f` 可以是一个Lua函数,也可是一个表示调用栈层级的数字。' + [getmetatable] description = '返回该对象的元表。' @@ -117,6 +120,9 @@ name = 'mode' enum = 'bt' description = '可以是二进制也可以是文本。' +['load Lua 5.1'] +description = '使用 `func` 分段加载代码块。每次调用 `func` 必须返回一个字符串用于连接前文。' + [loadfile] description = '从文件中获取代码块。' [[.enums]] @@ -132,6 +138,15 @@ name = 'mode' enum = 'bt' description = '可以是二进制也可以是文本。' +['loadfile Lua 5.1'] +description = '从 `filename` 或标准输入中加载代码块。' + +[loadstring] +description = '使用给定字符串加载代码块。' + +[module] +description = '创建一个模块' + [next] description = '返回该键的下一个键及其关联的值。' @@ -173,6 +188,9 @@ name = 'index' code = 'integer' description = '返回参数中第 `index` 个之后的部分。' +[setfenv] +description = '设置给定函数的环境。 `f` 可以是一个Lua函数,也可是一个表示调用栈层级的数字。' + [setmetatable] description = '给指定表设置元表。' diff --git a/server/locale/zh-CN/libs/lua/debug.lni b/server/locale/zh-CN/libs/lua/debug.lni index 6aa9bd07..18c514c9 100644 --- a/server/locale/zh-CN/libs/lua/debug.lni +++ b/server/locale/zh-CN/libs/lua/debug.lni @@ -1,6 +1,9 @@ ["debug.debug"] description = '进入一个用户交互模式,运行用户输入的每个字符串。' +[getfenv] +description = '返回对象 `o` 的环境。` + [gethook] description = '返回三个表示线程钩子设置的值: 当前钩子函数,当前钩子掩码,当前钩子计数 。' @@ -53,6 +56,9 @@ description = '返回关联在 `u` 上的 `Lua` 值。' ["getuservalue Lua 5.4"] description = '返回关联在 `u` 上的第 `n` 个 `Lua` 值,以及一个布尔,`false`表示值不存在。' +[setfenv] +description = '将 `table` 设置为 `object` 的环境。' + [sethook] description = '将一个函数作为钩子函数设入。' [[.enums]] diff --git a/server/locale/zh-CN/libs/lua/math.lni b/server/locale/zh-CN/libs/lua/math.lni index ec1cfe9b..2f42b9e8 100644 --- a/server/locale/zh-CN/libs/lua/math.lni +++ b/server/locale/zh-CN/libs/lua/math.lni @@ -49,6 +49,12 @@ description = '返回 `m * (2 ^ e)` 。' [log] description = '返回以指定底的 `x` 的对数。' +['log Lua 5.1'] +description = '返回 `x` 的自然对数。` + +[log10] +description = '返回 `x` 的以10为底的对数。 + [max] description = '返回参数中最大的值, 大小由 Lua 操作 `<` 决定。' |