summaryrefslogtreecommitdiff
path: root/meta/template/bit.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-11-30 13:23:53 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-11-30 13:23:53 +0800
commitcd42d1141cfa7352d97e0d66ab93f31772578a5d (patch)
treef045dfcfb26c0ce820b85debcb1447e3f6a9c256 /meta/template/bit.lua
parent610fe9243f785c2388321d5ea84ca3973bea9dfc (diff)
downloadlua-language-server-cd42d1141cfa7352d97e0d66ab93f31772578a5d.zip
metas of LuaJIT
Diffstat (limited to 'meta/template/bit.lua')
-rw-r--r--meta/template/bit.lua67
1 files changed, 67 insertions, 0 deletions
diff --git a/meta/template/bit.lua b/meta/template/bit.lua
new file mode 100644
index 00000000..09b69194
--- /dev/null
+++ b/meta/template/bit.lua
@@ -0,0 +1,67 @@
+---@meta
+
+---@version JIT
+---@class bit*
+local bit = {}
+
+---@param x integer
+---@return integer y
+function bit.tobit(x) end
+
+---@param x integer
+---@param n? integer
+---@return integer y
+function bit.tohex(x, n) end
+
+---@param x integer
+---@return integer y
+function bit.bnot(x) end
+
+---@param x integer
+---@param x2 integer
+---@vararg integer
+---@return integer y
+function bit.bor(x, x2, ...) end
+
+---@param x integer
+---@param x2 integer
+---@vararg integer
+---@return integer y
+function bit.band(x, x2, ...) end
+
+---@param x integer
+---@param x2 integer
+---@vararg integer
+---@return integer y
+function bit.bxor(x, x2, ...) end
+
+---@param x integer
+---@param n integer
+---@return integer y
+function bit.lshift(x, n) end
+
+---@param x integer
+---@param n integer
+---@return integer y
+function bit.rshift(x, n) end
+
+---@param x integer
+---@param n integer
+---@return integer y
+function bit.arshift(x, n) end
+
+---@param x integer
+---@param n integer
+---@return integer y
+function bit.rol(x, n) end
+
+---@param x integer
+---@param n integer
+---@return integer y
+function bit.ror(x, n) end
+
+---@param x integer
+---@return integer y
+function bit.bswap(x) end
+
+return bit