diff options
Diffstat (limited to 'meta/template')
-rw-r--r-- | meta/template/bit32.lua | 55 | ||||
-rw-r--r-- | meta/template/coroutine.lua | 41 | ||||
-rw-r--r-- | meta/template/debug.lua | 14 |
3 files changed, 110 insertions, 0 deletions
diff --git a/meta/template/bit32.lua b/meta/template/bit32.lua new file mode 100644 index 00000000..c3271937 --- /dev/null +++ b/meta/template/bit32.lua @@ -0,0 +1,55 @@ +---@class bit32 +bit32 = {} + +---@param x integer +---@param disp integer +---@return integer +function bit32.arshift(x, disp) end + +---@return integer +function bit32.band(...) end + +---@param x integer +---@return integer +function bit32.bnot(x) end + +---@return integer +function bit32.bor(...) end + +---@return boolean +function bit32.btest(...) end + +---@return integer +function bit32.bxor(...) end + +---@param n integer +---@param field integer +---@param width integer? +---@return integer +function bit32.extract(n, field, width) end + +---@param n integer +---@param v integer +---@param field integer +---@param width integer? +function bit32.replace(n, v, field, width) end + +---@param x integer +---@param distp integer +---@return integer +function bit32.lrotate(x, distp) end + +---@param x integer +---@param distp integer +---@return integer +function bit32.lshift(x, distp) end + +---@param x integer +---@param distp integer +---@return integer +function bit32.rrotate(x, distp) end + +---@param x integer +---@param distp integer +---@return integer +function bit32.rshift(x, distp) end diff --git a/meta/template/coroutine.lua b/meta/template/coroutine.lua new file mode 100644 index 00000000..74213cd1 --- /dev/null +++ b/meta/template/coroutine.lua @@ -0,0 +1,41 @@ +---@class coroutine +coroutine = {} + +---@param f function +---@return thread +function coroutine.create(f) end + +---@param co thread? +---@return boolean +function coroutine.isyieldable(co) end + +---@param co thread +---@return boolean noerror +---@return any errorobject +function coroutine.close(co) end + +---@param co thread +---@param val1 any? +---@return boolean success +---@return any result +---@return ... +function coroutine.resume(co, val1, ...) end + +---@return thread running +---@return boolean ismain +function coroutine.running() end + +---@param co thread +---@return +---| '"running"' +---| '"suspended"' +---| '"normal"' +---| '"dead"' +function coroutine.status(co) end + +---@param f function +---@return ... +function coroutine.wrap(f) end + +---@return ... +function coroutine.yield(...) end diff --git a/meta/template/debug.lua b/meta/template/debug.lua new file mode 100644 index 00000000..a8c7f2df --- /dev/null +++ b/meta/template/debug.lua @@ -0,0 +1,14 @@ +---@class debug +debug = {} + +function debug.debug() end + +---@param o any +---@return table +function debug.getfenv(o) end + +---@param co thread? +---@return function hook +---@return string mask +---@return integer count +function debug.gethook(co) end |