summaryrefslogtreecommitdiff
path: root/server/src/vm/function.lua
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-05-06 19:43:43 +0800
committersumneko <sumneko@hotmail.com>2019-05-06 19:43:43 +0800
commitce0e466279ccd237ec8b3df5e7ed9275b166e1c7 (patch)
tree765108bf350103345f4538b73e237bf016fce660 /server/src/vm/function.lua
parentdf62d7a467cc2ffa1d4945c4912a4568baf75847 (diff)
downloadlua-language-server-ce0e466279ccd237ec8b3df5e7ed9275b166e1c7.zip
param支持字面量
Diffstat (limited to 'server/src/vm/function.lua')
-rw-r--r--server/src/vm/function.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/server/src/vm/function.lua b/server/src/vm/function.lua
index e605e1c9..593d40dd 100644
--- a/server/src/vm/function.lua
+++ b/server/src/vm/function.lua
@@ -349,6 +349,15 @@ function mt:findEmmyParamByName(name)
return nil
end
+function mt:findEmmyParamByIndex(index)
+ local arg = self.args[index]
+ if not arg then
+ return nil
+ end
+ local name = arg:getName()
+ return self:findEmmyParamByName(name)
+end
+
function mt:addArg(name, source, value)
local loc = localMgr.create(name, source, value)
self:saveUpvalue(name, loc)