summaryrefslogtreecommitdiff
path: root/server/locale
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-04-09 10:16:27 +0800
committersumneko <sumneko@hotmail.com>2019-04-09 10:16:27 +0800
commitfd11589c1d5d32f85a9879fa008cb6b10798409a (patch)
tree6e4f15ab3606edc3919e40152d8878d472428342 /server/locale
parenteaeea1b4d1da5d8596d07ecb76026e40c4cfd01e (diff)
downloadlua-language-server-fd11589c1d5d32f85a9879fa008cb6b10798409a.zip
更新Lua 5.1API
Diffstat (limited to 'server/locale')
-rw-r--r--server/locale/en-US/libs/lua/basic.lni18
-rw-r--r--server/locale/en-US/libs/lua/debug.lni6
-rw-r--r--server/locale/en-US/libs/lua/math.lni6
-rw-r--r--server/locale/zh-CN/libs/lua/basic.lni18
-rw-r--r--server/locale/zh-CN/libs/lua/debug.lni6
-rw-r--r--server/locale/zh-CN/libs/lua/math.lni6
6 files changed, 60 insertions, 0 deletions
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 操作 `<` 决定。'