diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-14 18:14:23 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-14 18:14:23 +0800 |
commit | b25fe0dcbf3b06534d170caa294a5245273ea076 (patch) | |
tree | 325db05999037fa608df55b83c728e27549c011c | |
parent | 4f33ceec00032028c5cc47a00c1ec869902061a8 (diff) | |
download | lua-language-server-b25fe0dcbf3b06534d170caa294a5245273ea076.zip |
更新配置
-rw-r--r-- | server/libs/lua53/basic.lni | 54 | ||||
-rw-r--r-- | server/src/matcher/vm.lua | 2 |
2 files changed, 52 insertions, 4 deletions
diff --git a/server/libs/lua53/basic.lni b/server/libs/lua53/basic.lni index 3cd943f3..09092026 100644 --- a/server/libs/lua53/basic.lni +++ b/server/libs/lua53/basic.lni @@ -125,8 +125,44 @@ name = 'mode' enum = 'bt' [loadfile] +[[.args]] +name = 'filename' +type = 'string' +optional = 'after' +[[.args]] +name = 'mode' +type = 'string' +optional = 'after' +[[.args]] +name = 'env' +type = 'table' +optional = 'self' +[[.returns]] +type = 'function' +[[.returns]] +name = 'error_message' +type = 'string' +[[.enums]] +name = 'mode' +enum = 'b' +[[.enums]] +name = 'mode' +enum = 't' +[[.enums]] +name = 'mode' +enum = 'bt' [next] +[[.args]] +name = 'table' +type = 'table' +[[.args]] +name = 'index' +optional = 'self' +[[.returns]] +name = 'key' +[[.returns]] +name = 'value' [pairs] [[.args]] @@ -140,17 +176,31 @@ returns = { name = 'key', }, 2 = { - name = 'object', + name = 'value', }, } [[.returns]] name = 't' type = 'table' [[.returns]] -name = 'nil' type = 'nil' [pcall] +[[.args]] +name = 'f' +type = 'function' +[[.args]] +name = 'arg1' +optional = 'after' +[[.args]] +type = '...' +[[.returns]] +name = 'success' +type = 'boolean' +[[.returns]] +name = 'result' +[[.returns]] +type = '...' [print] diff --git a/server/src/matcher/vm.lua b/server/src/matcher/vm.lua index 0700f640..b1d303a9 100644 --- a/server/src/matcher/vm.lua +++ b/server/src/matcher/vm.lua @@ -445,7 +445,6 @@ function mt:setFunctionReturn(func, index, value) if not func.returns then func.returns = { type = 'list', - [1] = self:createValue('any'), } end if value then @@ -465,7 +464,6 @@ function mt:getFunctionReturns(func, i) if not func.returns then func.returns = { type = 'list', - [1] = self:createValue('any'), } end if i then |