summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--server/libs/lua/basic.lni16
-rw-r--r--server/libs/lua/debug.lni29
-rw-r--r--server/libs/lua/utf8.lni74
-rw-r--r--server/locale/en-US/libs/lua/basic.lni19
-rw-r--r--server/locale/en-US/libs/lua/debug.lni14
-rw-r--r--server/locale/en-US/libs/lua/utf8.lni16
-rw-r--r--server/locale/zh-CN/libs/lua/basic.lni11
7 files changed, 174 insertions, 5 deletions
diff --git a/server/libs/lua/basic.lni b/server/libs/lua/basic.lni
index a66b703c..f822588f 100644
--- a/server/libs/lua/basic.lni
+++ b/server/libs/lua/basic.lni
@@ -353,28 +353,38 @@ name = 'type'
enum = 'userdata'
["_VERSION Lua 5.1"]
+version = 'Lua 5.1'
name = '_VERSION'
type = 'string'
value = 'Lua 5.1'
-version = 'Lua 5.1'
["_VERSION Lua 5.2"]
+version = 'Lua 5.2'
name = '_VERSION'
type = 'string'
value = 'Lua 5.2'
-version = 'Lua 5.2'
["_VERSION Lua 5.3"]
+version = 'Lua 5.3'
name = '_VERSION'
type = 'string'
value = 'Lua 5.3'
-version = 'Lua 5.3'
["_VERSION Lua 5.4"]
+version = 'Lua 5.4'
name = '_VERSION'
type = 'string'
value = 'Lua 5.4'
+
+[warn]
version = 'Lua 5.4'
+[[.args]]
+name = 'message'
+type = 'string'
+``````````
+name = 'tocont'
+type = 'boolean'
+optional = 'after'
[xpcall]
[[.args]]
diff --git a/server/libs/lua/debug.lni b/server/libs/lua/debug.lni
index 578b9e9e..d9412e75 100644
--- a/server/libs/lua/debug.lni
+++ b/server/libs/lua/debug.lni
@@ -113,6 +113,20 @@ name = 'u'
type = 'userdata'
[[.returns]]
+["getuservalue Lua 5.4"]
+name = 'getuservalue'
+version = 'Lua 5.4'
+[[.args]]
+name = 'u'
+type = 'userdata'
+``````````
+name = 'n'
+type = 'integer'
+[[.returns]]
+type = 'any'
+``````````
+type = 'boolean'
+
[sethook]
[[.args]]
type = 'thread'
@@ -184,6 +198,21 @@ name = 'value'
name = 'udata'
type = 'userdata'
+["setuservalue Lua 5.4"]
+name = 'setuservalue'
+version = 'Lua 5.4'
+[[.args]]
+name = 'udata'
+type = 'userdata'
+``````````
+name = 'value'
+``````````
+name = 'n'
+type = 'integer
+[[.returns]]
+name = 'udata'
+type = 'userdata'
+
[traceback]
[[.args]]
type = 'thread'
diff --git a/server/libs/lua/utf8.lni b/server/libs/lua/utf8.lni
index 0bdc3d52..876fdd9c 100644
--- a/server/libs/lua/utf8.lni
+++ b/server/libs/lua/utf8.lni
@@ -1,4 +1,5 @@
[utf8]
+version = {'Lua 5.3', 'Lua 5.4'}
type = 'table'
[[.source]]
type = 'global'
@@ -7,6 +8,7 @@ type = 'library'
name = 'utf8'
<default>
+version = {'Lua 5.3', 'Lua 5.4'}
type = 'function'
parent = {
1 = {
@@ -48,6 +50,28 @@ returns = {
}
}
+["codes Lua 5.4"]
+name = 'codes'
+version = 'Lua 5.4'
+[[.args]]
+type = 'string'
+``````````
+name = 'lax'
+type = 'boolean'
+optional = 'after'
+[[.returns]]
+type = 'function'
+returns = {
+ 1 = {
+ name = 'p',
+ type = 'integer',
+ },
+ 2 = {
+ name = 'c',
+ type = 'integer',
+ }
+}
+
[codepoint]
[[.args]]
type = 'string'
@@ -66,6 +90,30 @@ type = 'integer'
``````````
type = '...'
+["codepoint Lua 5.4"]
+name = 'codepoint'
+version = 'Lua 5.4'
+[[.args]]
+type = 'string'
+``````````
+name = 'i'
+type = 'integer'
+optional = 'after'
+default = 1
+``````````
+name = 'j'
+type = 'integer'
+optional = 'after'
+``````````
+name = 'lax'
+type = 'boolean'
+optional = 'after'
+[[.returns]]
+name = 'code'
+type = 'integer'
+``````````
+type = '...'
+
[len]
[[.args]]
type = 'string'
@@ -86,6 +134,32 @@ name = 'errpos'
type = 'integer'
optional = 'self'
+["len Lua 5.4"]
+name = 'len'
+version = 'Lua 5.4'
+[[.args]]
+type = 'string'
+``````````
+name = 'i'
+type = 'integer'
+optional = 'after'
+default = 1
+``````````
+name = 'j'
+type = 'integer'
+optional = 'after'
+default = -1
+``````````
+name = 'lax'
+type = 'boolean'
+optional = 'after'
+[[.returns]]
+type = 'integer'
+``````````
+name = 'errpos'
+type = 'integer'
+optional = 'self'
+
[offset]
[[.args]]
type = 'string'
diff --git a/server/locale/en-US/libs/lua/basic.lni b/server/locale/en-US/libs/lua/basic.lni
index 571d8450..4f5afb84 100644
--- a/server/locale/en-US/libs/lua/basic.lni
+++ b/server/locale/en-US/libs/lua/basic.lni
@@ -143,9 +143,26 @@ description = 'Receives a value of any type and converts it to a string in a hum
[type]
description = 'Returns the type of its only argument, coded as a string.'
-[_VERSION]
+["_VERSION Lua 5.1"]
description = 'Running Lua version.'
+["_VERSION Lua 5.2"]
+description = 'Running Lua version.'
+
+["_VERSION Lua 5.3"]
+description = 'Running Lua version.'
+
+["_VERSION Lua 5.4"]
+description = 'Running Lua version.'
+
+[warn]
+description = [[
+Emits a warning with the given message.
+A message in a call with `tocont` true should be
+continued in another call to this function.
+The default for `tocont` is false.
+]]
+
[xpcall]
description = 'Calls function f with the given arguments in protected mode with a new message handler.'
diff --git a/server/locale/en-US/libs/lua/debug.lni b/server/locale/en-US/libs/lua/debug.lni
index d94a8b47..32d1da68 100644
--- a/server/locale/en-US/libs/lua/debug.lni
+++ b/server/locale/en-US/libs/lua/debug.lni
@@ -50,6 +50,13 @@ description = 'Returns the name and the value of the upvalue with index `up` of
[getuservalue]
description = 'Returns the Lua value associated to u.'
+["getuservalue Lua 5.4"]
+description = [[
+Returns the `n`-th user value associated
+to the userdata `u` plus a boolean,
+`false` if the userdata does not have that value.
+]]
+
[sethook]
description = 'Sets the given function as a hook.'
[[.enums]]
@@ -77,6 +84,13 @@ description = 'Assigns the `value` to the upvalue with index `up` of the functio
[setuservalue]
description = 'Sets the given value as the Lua value associated to the given udata.'
+["setuservalue Lua 5.4"]
+description = [[
+Sets the given `value` as
+the `n`-th user value associated to the given `udata`.
+`udata` must be a full userdata.
+]]
+
[traceback]
description = 'Returns a string with a traceback of the call stack. The optional message string is appended at the beginning of the traceback.'
diff --git a/server/locale/en-US/libs/lua/utf8.lni b/server/locale/en-US/libs/lua/utf8.lni
index b61411e1..c7ab9bf3 100644
--- a/server/locale/en-US/libs/lua/utf8.lni
+++ b/server/locale/en-US/libs/lua/utf8.lni
@@ -14,11 +14,27 @@ end
```
]]
+["codes Lua 5.4"]
+description = [[
+--------
+```lua
+for p, c in utf8.codes(s) do
+ body
+end
+```
+]]
+
[codepoint]
description = 'Returns the codepoints (as integers) from all characters in `s` that start between byte position `i` and `j` (both included).'
+["codepoint Lua 5.4"]
+description = 'Returns the codepoints (as integers) from all characters in `s` that start between byte position `i` and `j` (both included).'
+
[len]
description = 'Returns the number of UTF-8 characters in string `s` that start between positions `i` and `j` (both inclusive).'
+["len Lua 5.4"]
+description = 'Returns the number of UTF-8 characters in string `s` that start between positions `i` and `j` (both inclusive).'
+
[offset]
description = 'Returns the position (in bytes) where the encoding of the `n`-th character of `s` (counting from position `i`) starts.'
diff --git a/server/locale/zh-CN/libs/lua/basic.lni b/server/locale/zh-CN/libs/lua/basic.lni
index 7ffeae60..40b6bd6c 100644
--- a/server/locale/zh-CN/libs/lua/basic.lni
+++ b/server/locale/zh-CN/libs/lua/basic.lni
@@ -143,7 +143,16 @@ description = '可以接收任何类型,它将其转换为人可阅读的字
[type]
description = '将参数的类型编码为一个字符串返回。'
-[_VERSION]
+["_VERSION Lua 5.1"]
+description = '当前解释器版本号。'
+
+["_VERSION Lua 5.2"]
+description = '当前解释器版本号。'
+
+["_VERSION Lua 5.3"]
+description = '当前解释器版本号。'
+
+["_VERSION Lua 5.4"]
description = '当前解释器版本号。'
[xpcall]