summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-04-09 22:10:13 +0800
committersumneko <sumneko@hotmail.com>2019-04-09 22:10:13 +0800
commit152493371538908b2dda622a62bea92c46ed20db (patch)
tree80d2d43b5c4bdb31f243baec9b45c41657fd7660
parentadc1c62a5af178825d5c275f53ed0836f0836078 (diff)
downloadlua-language-server-152493371538908b2dda622a62bea92c46ed20db.zip
LuaJIT 的API
-rw-r--r--server/libs/@lua/jit.lni66
-rw-r--r--server/libs/luaJIT/bit.lni135
-rw-r--r--server/libs/luaJIT/ffi.lni191
3 files changed, 392 insertions, 0 deletions
diff --git a/server/libs/@lua/jit.lni b/server/libs/@lua/jit.lni
new file mode 100644
index 00000000..d8e2c7ec
--- /dev/null
+++ b/server/libs/@lua/jit.lni
@@ -0,0 +1,66 @@
+<default>
+version = LuaJIT
+
+[jit]
+type = table
+[[.source]]
+type = global
+name = jit
+
+<default>
+type = function
+parent = {
+ 1 = {
+ type = 'global',
+ name = 'jit',
+ },
+}
+
+[on]
+[[.args]]
+type = {'function', 'boolean'}
+optional = after
+``````````
+type = boolean
+optional = after
+
+[off]
+[[.args]]
+type = {'function', 'boolean'}
+optional = after
+``````````
+type = boolean
+optional = after
+
+[flush]
+[[.args]]
+type = {'function', 'boolean'}
+optional = after
+``````````
+type = boolean
+optional = after
+
+[status]
+[[.returns]]
+name = status
+type = boolean
+``````````
+type = '...'
+
+[version]
+type = string
+
+[version_num]
+type = string
+
+[os]
+type = string
+
+[arch]
+type = string
+
+[opt]
+type = table
+
+[util]
+type = table
diff --git a/server/libs/luaJIT/bit.lni b/server/libs/luaJIT/bit.lni
new file mode 100644
index 00000000..f6881983
--- /dev/null
+++ b/server/libs/luaJIT/bit.lni
@@ -0,0 +1,135 @@
+[bit]
+type = table
+[[.source]]
+type = library
+name = bit
+
+<default>
+type = function
+parent = {
+ 1 = {
+ type = 'library',
+ name = 'bit',
+ },
+}
+
+[tobit]
+[[.args]]
+name = x
+type = number
+[[.returns]]
+type = number
+
+[tohex]
+[[.args]]
+name = x
+type = number
+``````````
+name = n
+type = number
+optional = after
+[[.returns]]
+type = number
+
+[bnot]
+[[.args]]
+name = x
+type = number
+[[.returns]]
+type = number
+
+[bor]
+[[.args]]
+name = x1
+type = number
+``````````
+name = x2
+type = number
+optional = after
+`````````
+type = '...'
+[[.returns]]
+type = number
+
+[band]
+[[.args]]
+name = x1
+type = number
+``````````
+name = x2
+type = number
+optional = after
+`````````
+type = '...'
+[[.returns]]
+type = number
+
+[bxor]
+[[.args]]
+name = x1
+type = number
+``````````
+name = x2
+type = number
+optional = after
+`````````
+type = '...'
+[[.returns]]
+type = number
+
+[lshift]
+[[.args]]
+name = x
+type = number
+``````````
+name = n
+type = number
+[[.returns]]
+type = number
+
+[rshift]
+[[.args]]
+name = x
+type = number
+``````````
+name = n
+type = number
+[[.returns]]
+type = number
+
+[arshift]
+[[.args]]
+name = x
+type = number
+``````````
+name = n
+type = number
+[[.returns]]
+type = number
+
+[rol]
+[[.args]]
+name = x
+type = number
+``````````
+name = n
+type = number
+[[.returns]]
+type = number
+
+[ror]
+[[.args]]
+name = x
+type = number
+``````````
+name = n
+type = number
+[[.returns]]
+type = number
+
+[bswap]
+[[.args]]
+name = x
+type = number
+[[.returns]]
+type = number
diff --git a/server/libs/luaJIT/ffi.lni b/server/libs/luaJIT/ffi.lni
new file mode 100644
index 00000000..ac0191a7
--- /dev/null
+++ b/server/libs/luaJIT/ffi.lni
@@ -0,0 +1,191 @@
+[ffi]
+type = table
+[[.source]]
+type = library
+name = ffi
+
+<default>
+type = function
+parent = {
+ 1 = {
+ type = 'library',
+ name = 'ffi',
+ },
+}
+
+[cdef]
+[[.args]]
+name = def
+type = string
+
+[C]
+type = namespace
+
+[load]
+[[.args]]
+name = name
+type = string
+``````````
+name = global
+type = boolean
+optional = after
+[[.returns]]
+name = clib
+type = namespace
+
+[new]
+[[.args]]
+name = ct
+type = string
+``````````
+name = nelem
+type = number
+optional = self
+``````````
+name = init
+optional = after
+``````````
+type = '...'
+[[.returns]]
+type = cdata
+
+[typeof]
+[[.args]]
+name = ct
+type = string
+[[.returns]]
+type = ctype
+
+[cast]
+[[.args]]
+name = ct
+type = string
+``````````
+name = init
+[[.returns]]
+type = cdata
+
+[metatype]
+[[.args]]
+name = ct
+type = string
+``````````
+name = metatable
+type = table
+[[.returns]]
+type = ctype
+
+[gc]
+[[.args]]
+type = cdata
+``````````
+name = finalizer
+type = function
+[[.returns]]
+type = cdata
+
+[sizeof]
+[[.args]]
+name = ct
+type = string
+``````````
+name = nelem
+type = number
+optional = after
+[[.returns]]
+name = size
+type = number
+
+[alignof]
+[[.args]]
+name = ct
+type = string
+[[.returns]]
+name = align
+type = number
+
+[offsetof]
+[[.args]]
+name = ct
+type = string
+``````````
+name = field
+type = string
+[[.returns]]
+name = ofs
+type = number
+``````````
+name = bpos
+type = number
+optional = after
+``````````
+name = bsize
+type = number
+
+[istype]
+[[.args]]
+name = ct
+type = string
+``````````
+name = obj
+[[.returns]]
+name = status
+type = boolean
+
+[errno]
+[[.args]]
+name = newerr
+type = number
+optional = after
+[[.returns]]
+name = err
+type = number
+
+[string]
+[[.args]]
+name = ptr
+type = number
+``````````
+name = len
+type = number
+optional = after
+[[.returns]]
+name = str
+type = string
+
+[copy]
+[[.args]]
+name = dst
+type = number
+``````````
+name = src
+type = number/string
+``````````
+name = len
+type = number
+
+[fill]
+[[.args]]
+name = dst
+type = number
+``````````
+name = len
+type = number
+``````````
+name = c
+type = string
+optional = after
+
+[abi]
+[[.args]]
+name = param
+type = string
+[[.returns]]
+name = status
+type = boolean
+
+[os]
+type = 'string'
+
+[arch]
+type = 'string'