summaryrefslogtreecommitdiff
path: root/server/meta
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-06-28 15:47:48 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-06-28 15:47:48 +0800
commitef00d018e5f3292dd08deeeabfc77e6c75492a67 (patch)
treeaa1e4500d9e122027762935721c1adbc59cfc45d /server/meta
parentdaee93fb17e8f206e63ab8573566762011a3f1cd (diff)
downloadlua-language-server-ef00d018e5f3292dd08deeeabfc77e6c75492a67.zip
支持返回值命名
Diffstat (limited to 'server/meta')
-rw-r--r--server/meta/Lua 5.4/basic.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/server/meta/Lua 5.4/basic.lua b/server/meta/Lua 5.4/basic.lua
index 9c301c72..23d87cdb 100644
--- a/server/meta/Lua 5.4/basic.lua
+++ b/server/meta/Lua 5.4/basic.lua
@@ -31,7 +31,15 @@ end
--- 当前解释器版本号。
_VERSION = 'Lua 5.4'
-local next = next
+--- 返回该键的下一个键及其关联的值。
+---@param t table
+---@param index any {optional = 'self'}
+---@return any {name = 'key'}
+---@return any {name = 'value'}
+local function next(t, index)
+end
+
+_G['next'] = next
--- 能迭代表 `t` 中的所有键值对。
---|```lua