From e5131f6964d22e26cfcc6075e547666452df699c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 5 Mar 2019 14:28:09 +0800 Subject: =?UTF-8?q?=E5=B1=80=E9=83=A8=E5=87=BD=E6=95=B0=E7=9A=84hover?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/vm/function.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'server/src/vm') diff --git a/server/src/vm/function.lua b/server/src/vm/function.lua index f3d4720c..8eebb59c 100644 --- a/server/src/vm/function.lua +++ b/server/src/vm/function.lua @@ -212,6 +212,20 @@ function mt:createArgs() end end +function mt:setFlag(name, v) + if not self._flag then + self._flag = {} + end + self._flag[name] = v +end + +function mt:getFlag(name) + if not self._flag then + return nil + end + return self._flag[name] +end + return function (source) local self = setmetatable({ source = source, -- cgit v1.2.3