diff options
author | sumneko <sumneko@hotmail.com> | 2019-05-06 19:43:43 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2019-05-06 19:43:43 +0800 |
commit | ce0e466279ccd237ec8b3df5e7ed9275b166e1c7 (patch) | |
tree | 765108bf350103345f4538b73e237bf016fce660 /server/src/vm/function.lua | |
parent | df62d7a467cc2ffa1d4945c4912a4568baf75847 (diff) | |
download | lua-language-server-ce0e466279ccd237ec8b3df5e7ed9275b166e1c7.zip |
param支持字面量
Diffstat (limited to 'server/src/vm/function.lua')
-rw-r--r-- | server/src/vm/function.lua | 9 |
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) |