summaryrefslogtreecommitdiff
path: root/meta/template/bit.lua
diff options
context:
space:
mode:
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