From ce0e466279ccd237ec8b3df5e7ed9275b166e1c7 Mon Sep 17 00:00:00 2001 From: sumneko Date: Mon, 6 May 2019 19:43:43 +0800 Subject: =?UTF-8?q?param=E6=94=AF=E6=8C=81=E5=AD=97=E9=9D=A2=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/vm/function.lua | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'server/src/vm/function.lua') 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) -- cgit v1.2.3