diff options
author | sumneko <sumneko@hotmail.com> | 2019-04-09 10:16:27 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2019-04-09 10:16:27 +0800 |
commit | fd11589c1d5d32f85a9879fa008cb6b10798409a (patch) | |
tree | 6e4f15ab3606edc3919e40152d8878d472428342 /server/libs | |
parent | eaeea1b4d1da5d8596d07ecb76026e40c4cfd01e (diff) | |
download | lua-language-server-fd11589c1d5d32f85a9879fa008cb6b10798409a.zip |
更新Lua 5.1API
Diffstat (limited to 'server/libs')
-rw-r--r-- | server/libs/lua/basic.lni | 88 | ||||
-rw-r--r-- | server/libs/lua/debug.lni | 16 | ||||
-rw-r--r-- | server/libs/lua/math.lni | 17 | ||||
-rw-r--r-- | server/libs/lua/table.lni | 1 |
4 files changed, 122 insertions, 0 deletions
diff --git a/server/libs/lua/basic.lni b/server/libs/lua/basic.lni index d1c272b5..51c6fb03 100644 --- a/server/libs/lua/basic.lni +++ b/server/libs/lua/basic.lni @@ -110,6 +110,16 @@ optional = 'self' [_G] type = 'table' +[getfenv] +version = 'Lua 5.1' +[[.args]] +name = f +type = function +optional = after +default = 1 +[[.returns]] +type = table + [getmetatable] [[.args]] name = 'object' @@ -152,6 +162,7 @@ type = 'integer' default = 0 [load] +name = 'load' [[.args]] name = 'chunk' type = {'string', 'function'} @@ -188,6 +199,26 @@ name = 'mode' enum = 'bt' default = true +['load Lua 5.1'] +name = 'load' +version = {'Lua 5.1'} +[[.args]] +name = 'func' +type = 'function' +`````````` +name = 'chunkname' +type = 'string' +[[.returns]] +type = 'function' +args = { + 1 = { + type = '...' + }, +} +`````````` +name = 'error_message' +type = 'string' + [loadfile] special = 'loadfile' [[.args]] @@ -223,6 +254,53 @@ name = 'mode' enum = 'bt' default = true +['loadfile Lua 5.1'] +name = 'loadfile' +special = 'loadfile' +version = 'Lua 5.1' +[[.args]] +name = 'filename' +type = 'string' +optional = 'after' +[[.returns]] +type = 'function' +args = { + 1 = { + type = '...' + }, +} +`````````` +name = 'error_message' +type = 'string' + +[loadstring] +version = 'Lua 5.1' +[[.args]] +type = string +````````` +name = chunkname +type = string +optional = after +[[.returns]] +type = 'function' +args = { + 1 = { + type = '...' + }, +} +`````````` +name = 'error_message' +type = 'string' + +[module] +version = 'Lua 5.1' +[[.args]] +name = name +type = string +`````````` +type = '...' +optional = after + [next] [[.args]] name = 'table' @@ -337,6 +415,16 @@ enum = '#' name = 'index' code = 'integer' +[setfenv] +version = 'Lua 5.1' +[[.args]] +name = f +type = function/integer +````````` +type = table +[[.returns]] +type = function + [setmetatable] special = 'setmetatable' [[.args]] diff --git a/server/libs/lua/debug.lni b/server/libs/lua/debug.lni index 15752446..74d50161 100644 --- a/server/libs/lua/debug.lni +++ b/server/libs/lua/debug.lni @@ -22,6 +22,13 @@ parent = { ["debug.debug"] name = 'debug' +[getfenv] +version = 'Lua 5.1' +[[.args]] +name = o +[[.returns]] +type = table + [gethook] [[.args]] type = 'thread' @@ -127,6 +134,15 @@ type = 'any' `````````` type = 'boolean' +[setfenv] +version = 'Lua 5.1' +[[.args]] +name = 'object' +`````````` +type = 'table' +[[.returns]] +name = 'object' + [sethook] [[.args]] type = 'thread' diff --git a/server/libs/lua/math.lni b/server/libs/lua/math.lni index 4f807b0c..20f75315 100644 --- a/server/libs/lua/math.lni +++ b/server/libs/lua/math.lni @@ -167,6 +167,23 @@ default = 'e' [[.returns]] type = 'number' +['log Lua 5.1'] +name = log +version = {'Lua 5.1'} +[[.args]] +name = 'x' +type = 'number' +[[.returns]] +type = 'number' + +[log10] +version = 'Lua 5.1' +[[.args]] +name = 'x' +type = 'number' +[[.returns]] +type = 'number' + [max] [[.args]] name = 'x' diff --git a/server/libs/lua/table.lni b/server/libs/lua/table.lni index b3f3f113..5266cb41 100644 --- a/server/libs/lua/table.lni +++ b/server/libs/lua/table.lni @@ -53,6 +53,7 @@ name = 'value' type = 'any' [move] +version = {'Lua 5.3', 'Lua 5.4'} [[.args]] name = 'a1' type = 'table' |