From f6a6e9f9d36d34c542c721db41a4e9770bcebcf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Fri, 28 Jun 2019 11:13:52 +0800 Subject: =?UTF-8?q?alias=E6=94=AF=E6=8C=81enum.option?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/emmy/alias.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/src/emmy') diff --git a/server/src/emmy/alias.lua b/server/src/emmy/alias.lua index be47cb4f..7e015542 100644 --- a/server/src/emmy/alias.lua +++ b/server/src/emmy/alias.lua @@ -21,13 +21,13 @@ function mt:bindType(type) end end -function mt:addEnum(enum) - self._enum[#self._enum+1] = enum +function mt:addEnum(enum, option) + self._enum[#self._enum+1] = {enum, option} end function mt:eachEnum(callback) for _, enum in ipairs(self._enum) do - callback(enum) + callback(enum[1], enum[2]) end end -- cgit v1.2.3