diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-11-05 20:34:17 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-11-05 20:34:17 +0800 |
commit | 12eecd0df7d2c577d56b5e81e393963a614dc8e7 (patch) | |
tree | 2a6d85959cf9fbe4d7feee44c552f0f868d8743d /server-beta/src/parser/compile.lua | |
parent | c844e46ae97f28ec928db6b701fdf5f2eea2664d (diff) | |
download | lua-language-server-12eecd0df7d2c577d56b5e81e393963a614dc8e7.zip |
更新诊断
Diffstat (limited to 'server-beta/src/parser/compile.lua')
-rw-r--r-- | server-beta/src/parser/compile.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/server-beta/src/parser/compile.lua b/server-beta/src/parser/compile.lua index 81a1ba4f..6479106f 100644 --- a/server-beta/src/parser/compile.lua +++ b/server-beta/src/parser/compile.lua @@ -53,7 +53,7 @@ local vmMap = { ['varargs'] = function (obj) local func = guide.getParentFunction(obj) if func then - local index = guide.getFunctionVarArgs(func) + local index, vararg = guide.getFunctionVarArgs(func) if not index then pushError { type = 'UNEXPECT_DOTS', @@ -61,6 +61,12 @@ local vmMap = { finish = obj.finish, } end + if vararg then + if not vararg.ref then + vararg.ref = {} + end + vararg.ref[#vararg.ref+1] = obj + end end end, ['paren'] = function (obj) |