diff options
author | sumneko <sumneko@hotmail.com> | 2019-04-09 15:56:36 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2019-04-09 15:56:36 +0800 |
commit | d29789157f0988dd0f189c35ed581cb3cfdeb5c8 (patch) | |
tree | fa073a6cfc5dc32a8e6f691064a61d3978fb9eaf /server/libs/@lua | |
parent | 79961aa0bd5ea6d297683e976165ea70866c12d3 (diff) | |
download | lua-language-server-d29789157f0988dd0f189c35ed581cb3cfdeb5c8.zip |
LuaJITēAPI
Diffstat (limited to 'server/libs/@lua')
-rw-r--r-- | server/libs/@lua/basic.lni | 14 | ||||
-rw-r--r-- | server/libs/@lua/debug.lni | 21 | ||||
-rw-r--r-- | server/libs/@lua/io.lni | 70 | ||||
-rw-r--r-- | server/libs/@lua/math.lni | 18 | ||||
-rw-r--r-- | server/libs/@lua/os.lni | 11 | ||||
-rw-r--r-- | server/libs/@lua/package.lni | 5 | ||||
-rw-r--r-- | server/libs/@lua/string.lni | 11 | ||||
-rw-r--r-- | server/libs/@lua/table.lni | 2 |
8 files changed, 123 insertions, 29 deletions
diff --git a/server/libs/@lua/basic.lni b/server/libs/@lua/basic.lni index 14c4f669..13cf51a6 100644 --- a/server/libs/@lua/basic.lni +++ b/server/libs/@lua/basic.lni @@ -111,7 +111,7 @@ optional = 'self' type = 'table' [getfenv] -version = 'Lua 5.1' +version = {'Lua 5.1', 'LuaJIT'} [[.args]] name = f type = function @@ -201,7 +201,7 @@ default = true ['load Lua 5.1'] name = 'load' -version = {'Lua 5.1'} +version = 'Lua 5.1' [[.args]] name = 'func' type = 'function' @@ -274,7 +274,7 @@ name = 'error_message' type = 'string' [loadstring] -version = 'Lua 5.1' +version = {'Lua 5.1', 'LuaJIT'} [[.args]] type = string ````````` @@ -293,7 +293,7 @@ name = 'error_message' type = 'string' [module] -version = 'Lua 5.1' +version = {'Lua 5.1', 'LuaJIT'} special = 'module' [[.args]] name = name @@ -419,7 +419,7 @@ name = 'index' code = 'integer' [setfenv] -version = 'Lua 5.1' +version = {'Lua 5.1', 'LuaJIT'} [[.args]] name = f type = function/integer @@ -488,7 +488,7 @@ name = 'type' enum = 'userdata' ["_VERSION Lua 5.1"] -version = 'Lua 5.1' +version = {'Lua 5.1', 'LuaJIT'} name = '_VERSION' type = 'string' value = 'Lua 5.1' @@ -549,7 +549,7 @@ type = 'string' [[.returns]] [unpack] -version = {'Lua 5.1'} +version = {'Lua 5.1', 'LuaJIT'} [[.args]] name = 'list' type = 'table' diff --git a/server/libs/@lua/debug.lni b/server/libs/@lua/debug.lni index 74d50161..0d4def79 100644 --- a/server/libs/@lua/debug.lni +++ b/server/libs/@lua/debug.lni @@ -23,7 +23,7 @@ parent = { name = 'debug' [getfenv] -version = 'Lua 5.1' +version = {'Lua 5.1', 'LuaJIT'} [[.args]] name = o [[.returns]] @@ -79,6 +79,10 @@ enum = 'f' name = 'what' enum = 'L' +['getinfo Lua 5.1':getinfo] +name = 'getinfo' +version = 'Lua 5.1' + [getlocal] [[.args]] type = 'thread' @@ -90,6 +94,17 @@ type = {'integer', 'function'} name = 'local' type = 'integer' +['getlocal Lua 5.1'] +[[.args]] +type = 'thread' +optional = 'self' +`````````` +name = 'level' +type = integer' +`````````` +name = 'local' +type = 'integer' + [getmetatable] [[.args]] name = 'value' @@ -135,7 +150,7 @@ type = 'any' type = 'boolean' [setfenv] -version = 'Lua 5.1' +version = {'Lua 5.1', 'LuaJIT'} [[.args]] name = 'object' `````````` @@ -244,6 +259,7 @@ default = 1 name = 'message' [upvalueid] +version = {'Lua 5.2', 'Lua 5.3', 'Lua 5.4', 'LuaJIT'} [[.args]] name = 'f' type = 'function' @@ -255,6 +271,7 @@ name = 'id' type = 'userdata' [upvaluejoin] +version = {'Lua 5.2', 'Lua 5.3', 'Lua 5.4', 'LuaJIT'} [[.args]] name = 'f1' type = 'function' diff --git a/server/libs/@lua/io.lni b/server/libs/@lua/io.lni index bf59969f..d267a2e3 100644 --- a/server/libs/@lua/io.lni +++ b/server/libs/@lua/io.lni @@ -91,9 +91,6 @@ enum = '*l' default = true `````````` name = 'mode' -enum = '*L' -`````````` -name = 'mode' code = 'number' ["lines Lua 5.3"] @@ -131,6 +128,41 @@ enum = 'L' name = 'mode' code = 'number' +["lines LuaJIT"] +name = 'lines' +version = 'LuaJIT' +[[.args]] +name = 'filename' +type = 'string' +optional = 'after' +`````````` +name = 'mode' +type = '...' +[[.returns]] +type = 'function' +returns = { + 1 = { + name = 'c', + type = {'string', 'number'}, + } +} +[[.enums]] +name = 'mode' +enum = '*n' +`````````` +name = 'mode' +enum = '*a' +`````````` +name = 'mode' +enum = '*l' +default = true +`````````` +name = 'mode' +enum = '*L' +`````````` +name = 'mode' +code = 'number' + [open] [[.args]] name = 'filename' @@ -186,7 +218,7 @@ enum = 'w' ["read Lua 5.1"] name = 'read' -version = {'Lua 5.3', 'Lua 5.4'} +version = {'Lua 5.1', 'Lua 5.2'} [[.args]] name = 'mode' type = '...' @@ -206,9 +238,6 @@ enum = '*l' default = true `````````` name = 'mode' -enum = '*L' -`````````` -name = 'mode' code = 'number' ["read Lua 5.3"] @@ -238,6 +267,33 @@ enum = 'L' name = 'mode' code = 'number' +["read LuaJIT"] +name = 'read' +version = 'LuaJIT' +[[.args]] +name = 'mode' +type = '...' +[[.returns]] +type = {'string', 'number'} +`````````` +type = '...' +[[.enums]] +name = 'mode' +enum = '*n' +`````````` +name = 'mode' +enum = '*a' +`````````` +name = 'mode' +enum = '*l' +default = true +`````````` +name = 'mode' +enum = '*L' +`````````` +name = 'mode' +code = 'number' + [tmpfile] [[.returns]] type = 'FILE*' diff --git a/server/libs/@lua/math.lni b/server/libs/@lua/math.lni index 20f75315..ecc0360d 100644 --- a/server/libs/@lua/math.lni +++ b/server/libs/@lua/math.lni @@ -42,7 +42,7 @@ type = 'number' ["atan Lua 5.1"] name = 'atan' -version = {'Lua 5.1', 'Lua 5.2'} +version = {'Lua 5.1', 'Lua 5.2', 'LuaJIT'} [[.args]] name = 'y' type = 'number' @@ -64,7 +64,7 @@ default = 1 type = 'number' [atan2] -version = {'Lua 5.1', 'Lua 5.2'} +version = {'Lua 5.1', 'Lua 5.2', 'LuaJIT'} [[.args]] name = 'y' type = 'number' @@ -91,7 +91,7 @@ type = 'number' type = 'number' [cosh] -version = {'Lua 5.1', 'Lua 5.2'} +version = {'Lua 5.1', 'Lua 5.2', 'LuaJIT'} [[.args]] name = 'x' type = 'number' @@ -130,7 +130,7 @@ type = 'number' type = 'number' [frexp] -version = {'Lua 5.1', 'Lua 5.2'} +version = {'Lua 5.1', 'Lua 5.2', 'LuaJIT'} [[.args]] name = 'x' type = 'number' @@ -145,7 +145,7 @@ type = 'number' type = 'number' [ldexp] -version = {'Lua 5.1', 'Lua 5.2'} +version = {'Lua 5.1', 'Lua 5.2', 'LuaJIT'} [[.args]] name = 'm' type = 'number' @@ -169,7 +169,7 @@ type = 'number' ['log Lua 5.1'] name = log -version = {'Lua 5.1'} +version = 'Lua 5.1' [[.args]] name = 'x' type = 'number' @@ -221,7 +221,7 @@ type = 'number' type = 'number' [power] -version = {'Lua 5.1', 'Lua 5.2'} +version = {'Lua 5.1', 'Lua 5.2', 'LuaJIT'} [[.args]] name = 'x' type = 'number' @@ -276,7 +276,7 @@ type = 'number' type = 'number' [sinh] -version = {'Lua 5.1', 'Lua 5.2'} +version = {'Lua 5.1', 'Lua 5.2', 'LuaJIT'} [[.args]] name = 'x' type = 'number' @@ -298,7 +298,7 @@ type = 'number' type = 'number' [tanh] -version = {'Lua 5.1', 'Lua 5.2'} +version = {'Lua 5.1', 'Lua 5.2', 'LuaJIT'} [[.args]] name = 'x' type = 'number' diff --git a/server/libs/@lua/os.lni b/server/libs/@lua/os.lni index 64d5f1c9..8486075f 100644 --- a/server/libs/@lua/os.lni +++ b/server/libs/@lua/os.lni @@ -70,7 +70,7 @@ enum = 'signal' ['execute Lua 5.1'] name = 'execute' -version = 'Lua 5.1' +version = {'Lua 5.1', 'LuaJIT'} [[.args]] name = 'command' type = 'string' @@ -90,6 +90,15 @@ name = 'close' type = 'boolean' optional = 'self' +['exit Lua 5.1'] +name = 'exit' +version = 'Lua 5.1' +[[.args]] +name = 'code' +type = 'integer' +optional = 'after' +default = 0 + [getenv] [[.args]] name = 'varname' diff --git a/server/libs/@lua/package.lni b/server/libs/@lua/package.lni index 43ae7344..4a520e89 100644 --- a/server/libs/@lua/package.lni +++ b/server/libs/@lua/package.lni @@ -29,7 +29,7 @@ type = 'string' type = 'table' [loaders] -version = {'Lua 5.1'} +version = {'Lua 5.1', 'LuaJIT'} type = 'table' [loadlib] @@ -52,6 +52,7 @@ version = {'Lua 5.2', 'Lua 5.3', 'Lua 5.4'} type = 'table' [searchpath] +version = {'Lua 5.2', 'Lua 5.3', 'Lua 5.4', 'LuaJIT'} [[.args]] name = 'name' type = 'string' @@ -69,7 +70,7 @@ type = 'string' optional = 'self' [seeall] -version = 'Lua 5.1' +version = {'Lua 5.1', 'LuaJIT'} special = seeall [[.args]] name = module diff --git a/server/libs/@lua/string.lni b/server/libs/@lua/string.lni index bd454fc0..55bfde8a 100644 --- a/server/libs/@lua/string.lni +++ b/server/libs/@lua/string.lni @@ -219,6 +219,17 @@ default = '' [[.returns]] type = 'string' +['rep Lua 5.1'] +name = rep +version = 'Lua 5.1' +[[.args]] +type = 'string' +`````````` +name = n +type = 'integer' +[[.returns]] +type = 'string' + [reverse] [[.args]] type = 'string' diff --git a/server/libs/@lua/table.lni b/server/libs/@lua/table.lni index c48417c3..347756da 100644 --- a/server/libs/@lua/table.lni +++ b/server/libs/@lua/table.lni @@ -53,7 +53,7 @@ name = 'value' type = 'any' [maxn] -version = {'Lua 5.1'} +version = {'Lua 5.1', 'LuaJIT'} [[.args]] type = table [[.returns]] |