summaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-03-04 15:20:36 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-03-04 15:20:36 +0800
commit9eec125d9975b6ee44646d1fad0b6c406b2507a5 (patch)
treed4f655bc94a7baa56da7cbfc04440ef2514af7d8 /server/src
parent84cde0cbd4b18e38a2f97d65c75129677652fbe1 (diff)
downloadlua-language-server-9eec125d9975b6ee44646d1fad0b6c406b2507a5.zip
参数数量诊断
Diffstat (limited to 'server/src')
-rw-r--r--server/src/vm/vm.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/server/src/vm/vm.lua b/server/src/vm/vm.lua
index 9e19199e..364dcf18 100644
--- a/server/src/vm/vm.lua
+++ b/server/src/vm/vm.lua
@@ -103,6 +103,11 @@ function mt:runFunction(func)
return
end
+ -- 暂时使用这种方式激活参数的source
+ for _, arg in ipairs(func.args) do
+ self:bindLocal(arg.source, arg, 'local')
+ end
+
local originFunction = self:getCurrentFunction()
self:setCurrentFunction(func)
func:push()