summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--server/libs/lua/basic.lni15
-rw-r--r--server/libs/lua/os.lni12
-rw-r--r--server/libs/lua/package.lni5
-rw-r--r--server/libs/lua/table.lni9
-rw-r--r--server/locale/en-US/libs/lua/basic.lni8
-rw-r--r--server/locale/en-US/libs/lua/os.lni3
-rw-r--r--server/locale/en-US/libs/lua/package.lni3
-rw-r--r--server/locale/en-US/libs/lua/table.lni3
-rw-r--r--server/locale/zh-CN/libs/lua/basic.lni8
-rw-r--r--server/locale/zh-CN/libs/lua/os.lni3
-rw-r--r--server/locale/zh-CN/libs/lua/package.lni3
-rw-r--r--server/locale/zh-CN/libs/lua/table.lni3
12 files changed, 75 insertions, 0 deletions
diff --git a/server/libs/lua/basic.lni b/server/libs/lua/basic.lni
index 51c6fb03..a1463c00 100644
--- a/server/libs/lua/basic.lni
+++ b/server/libs/lua/basic.lni
@@ -544,3 +544,18 @@ special = 'require'
name = 'modname'
type = 'string'
[[.returns]]
+
+[unpack]
+version = {'Lua 5.1'}
+[[.args]]
+name = 'list'
+type = 'table'
+``````````
+name = 'i'
+type = 'integer'
+optional = 'after'
+type = 1
+``````````
+name = 'j'
+type = 'integer'
+optional = 'self'
diff --git a/server/libs/lua/os.lni b/server/libs/lua/os.lni
index 9e92de66..64d5f1c9 100644
--- a/server/libs/lua/os.lni
+++ b/server/libs/lua/os.lni
@@ -60,6 +60,7 @@ name = 'type'
type = 'string'
``````````
name = 'code'
+type = 'integer'
[[.enums]]
type = 'type'
enum = 'exit'
@@ -67,6 +68,17 @@ enum = 'exit'
type = 'type'
enum = 'signal'
+['execute Lua 5.1']
+name = 'execute'
+version = 'Lua 5.1'
+[[.args]]
+name = 'command'
+type = 'string'
+optional = 'self'
+[[.returns]]
+name = 'code'
+type = 'integer'
+
[exit]
[[.args]]
name = 'code'
diff --git a/server/libs/lua/package.lni b/server/libs/lua/package.lni
index a0843cae..85234fab 100644
--- a/server/libs/lua/package.lni
+++ b/server/libs/lua/package.lni
@@ -28,6 +28,10 @@ type = 'string'
[loaded]
type = 'table'
+[loaders]
+version = {'Lua 5.1'}
+type = 'table'
+
[loadlib]
[[.args]]
name = 'libname'
@@ -44,6 +48,7 @@ type = 'string'
type = 'table'
[searchers]
+version = {'Lua 5.2', 'Lua 5.3', 'Lua 5.4'}
type = 'table'
[searchpath]
diff --git a/server/libs/lua/table.lni b/server/libs/lua/table.lni
index 5266cb41..c48417c3 100644
--- a/server/libs/lua/table.lni
+++ b/server/libs/lua/table.lni
@@ -52,6 +52,13 @@ optional = 'self'
name = 'value'
type = 'any'
+[maxn]
+version = {'Lua 5.1'}
+[[.args]]
+type = table
+[[.returns]]
+type = integer
+
[move]
version = {'Lua 5.3', 'Lua 5.4'}
[[.args]]
@@ -75,6 +82,7 @@ name = 'a2'
type = 'table'
[pack]
+version = {'Lua 5.2', 'Lua 5.3', 'Lua 5.4'}
[[.args]]
type = '...'
[[.returns]]
@@ -100,6 +108,7 @@ type = 'function'
optional = 'self'
[unpack]
+version = {'Lua 5.2', 'Lua 5.3', 'Lua 5.4'}
[[.args]]
name = 'list'
type = 'table'
diff --git a/server/locale/en-US/libs/lua/basic.lni b/server/locale/en-US/libs/lua/basic.lni
index 9c982fbb..6a391cac 100644
--- a/server/locale/en-US/libs/lua/basic.lni
+++ b/server/locale/en-US/libs/lua/basic.lni
@@ -228,3 +228,11 @@ description = 'Calls function f with the given arguments in protected mode with
[require]
description = 'Loads the given module.'
+
+[unpack]
+description = [[
+-------
+```lua
+return list[i], list[i+1], ···, list[j]
+```
+]]
diff --git a/server/locale/en-US/libs/lua/os.lni b/server/locale/en-US/libs/lua/os.lni
index 7a4591a7..8be67434 100644
--- a/server/locale/en-US/libs/lua/os.lni
+++ b/server/locale/en-US/libs/lua/os.lni
@@ -10,6 +10,9 @@ description = 'Returns the difference, in seconds, from time `t1` to time `t2`.'
[execute]
description = 'Passes `command` to be executed by an operating system shell.'
+['execute Lua 5.1']
+description = 'Passes `command` to be executed by an operating system shell.'
+
[exit]
description = 'Calls the ISO C function `exit` to terminate the host program.'
diff --git a/server/locale/en-US/libs/lua/package.lni b/server/locale/en-US/libs/lua/package.lni
index 04a47011..b0a861a9 100644
--- a/server/locale/en-US/libs/lua/package.lni
+++ b/server/locale/en-US/libs/lua/package.lni
@@ -7,6 +7,9 @@ description = 'The path used by `require` to search for a C loader.'
[loaded]
description = 'A table used by `require` to control which modules are already loaded.'
+[loaders]
+description = 'A table used by `require` to control how to load modules.'
+
[loadlib]
description = 'Dynamically links the host program with the C library `libname`.'
diff --git a/server/locale/en-US/libs/lua/table.lni b/server/locale/en-US/libs/lua/table.lni
index 5f5454d3..d32ea4ae 100644
--- a/server/locale/en-US/libs/lua/table.lni
+++ b/server/locale/en-US/libs/lua/table.lni
@@ -9,6 +9,9 @@ return list[i]..sep..list[i+1] ··· sep..list[j]
[insert]
description = 'Inserts element `value` at position `pos` in `list`.'
+[maxn]
+description = 'Returns the largest positive numerical index of the given table, or zero if the table has no positive numerical indices.'
+
[move]
description = [[
Moves elements from table `a1` to table `a2`.
diff --git a/server/locale/zh-CN/libs/lua/basic.lni b/server/locale/zh-CN/libs/lua/basic.lni
index 44497d54..50124adf 100644
--- a/server/locale/zh-CN/libs/lua/basic.lni
+++ b/server/locale/zh-CN/libs/lua/basic.lni
@@ -223,3 +223,11 @@ description = '传入参数并设置一个消息处理器 `msgh`,以 *保护
[require]
description = '加载一个模块。'
+
+[unpack]
+description = [[
+-------
+```lua
+return list[i], list[i+1], ···, list[j]
+```
+]]
diff --git a/server/locale/zh-CN/libs/lua/os.lni b/server/locale/zh-CN/libs/lua/os.lni
index 4bfd2780..6a4bcf0f 100644
--- a/server/locale/zh-CN/libs/lua/os.lni
+++ b/server/locale/zh-CN/libs/lua/os.lni
@@ -10,6 +10,9 @@ description = '返回以秒计算的时刻 `t1` 到 `t2` 的差值。'
[execute]
description = '调用系统解释器执行 `command`。'
+['execute Lua 5.1']
+description = '调用系统解释器执行 `command`。'
+
[exit]
description = '调用 ISO C 函数 `exit` 终止宿主程序。'
diff --git a/server/locale/zh-CN/libs/lua/package.lni b/server/locale/zh-CN/libs/lua/package.lni
index d9bfe997..74dc0239 100644
--- a/server/locale/zh-CN/libs/lua/package.lni
+++ b/server/locale/zh-CN/libs/lua/package.lni
@@ -7,6 +7,9 @@ description = '这个路径被 `require` 在 C 加载器中做搜索时用到。
[loaded]
description = '用于 `require` 控制哪些模块已经被加载的表。'
+[loaders]
+description = '用于 `require` 控制如何加载模块的表。'
+
[loadlib]
description = '让宿主程序动态链接 C 库 `libname` 。'
diff --git a/server/locale/zh-CN/libs/lua/table.lni b/server/locale/zh-CN/libs/lua/table.lni
index 57b6588b..9163d8e5 100644
--- a/server/locale/zh-CN/libs/lua/table.lni
+++ b/server/locale/zh-CN/libs/lua/table.lni
@@ -9,6 +9,9 @@ return list[i]..sep..list[i+1] ··· sep..list[j]
[insert]
description = '在 `list` 的位置 `pos` 处插入元素 `value`。'
+[maxn]
+description = '返回给定表的最大正数索引,如果表没有正数索引,则返回零。'
+
[move]
description = [[
将元素从表 `a1` 移到表 `a2`。