summaryrefslogtreecommitdiff
path: root/server/meta
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-07-04 19:25:37 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-07-04 19:25:37 +0800
commit54453139868cdef82406b5868a9f78bc0838b6f7 (patch)
treec257fecd5a10680f628ef17e1bdc818a4de8e1f9 /server/meta
parent50af0738965aeeecd974f3ba52b2d23ccf3c257a (diff)
downloadlua-language-server-54453139868cdef82406b5868a9f78bc0838b6f7.zip
更新 meta
Diffstat (limited to 'server/meta')
-rw-r--r--server/meta/Lua 5.4/basic.lua32
1 files changed, 32 insertions, 0 deletions
diff --git a/server/meta/Lua 5.4/basic.lua b/server/meta/Lua 5.4/basic.lua
index 7fa412de..06a5c810 100644
--- a/server/meta/Lua 5.4/basic.lua
+++ b/server/meta/Lua 5.4/basic.lua
@@ -72,6 +72,19 @@ function load(chunk, chunkname, mode, env)
return function (...) end
end
+--- 从文件中获取代码块。
+---@overload fun():function,string
+---@overload fun(filename:string):function,string
+---@overload fun(filename:string, mode:loadOption):function,string
+---@param filename string {optional = 'after', special = 'loadfile:1'}
+---@param mode loadOption {optional = 'after'}
+---@param env table {optional = 'self'}
+---@return {name = 'init'}
+---@return string {name = 'errMessage', optional = 'self'}
+function loadfile(filename, mode, env)
+ return function (...) end
+end
+
--- 返回该键的下一个键及其关联的值。
---@overload fun(t:table):any, any
---@param t table
@@ -102,5 +115,24 @@ function pairs(t)
return next, t, nil
end
+--- 传入参数,以 *保护模式* 调用函数 `f` 。
+---@param f function {special = 'pcall:1'}
+---@param arg1 any {optional = 'after'}
+---@return boolean {name = 'success'}
+---@return {name = 'result'}
+function pcall(f, arg1, ...)
+end
+
+--- 接收任意数量的参数,并将它们的值打印到 `stdout`。
+function print(...)
+end
+
+--- 在不触发任何元方法的情况下 检查 `v1` 是否和 `v2` 相等。
+---@param v1 any
+---@param v2 any
+---@return boolean
+function rawequal(v1, v2)
+end
+
--- 当前解释器版本号。
_VERSION = 'Lua 5.4'