summaryrefslogtreecommitdiff
path: root/server/src/emmy
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-06-28 11:13:52 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-06-28 11:13:52 +0800
commitf6a6e9f9d36d34c542c721db41a4e9770bcebcf7 (patch)
tree5833c5c7dec4406800ad037c99d7ece1377329b4 /server/src/emmy
parent20b562e48b11df93a5926c919d793c1fe00aa018 (diff)
downloadlua-language-server-f6a6e9f9d36d34c542c721db41a4e9770bcebcf7.zip
alias支持enum.option
Diffstat (limited to 'server/src/emmy')
-rw-r--r--server/src/emmy/alias.lua6
1 files changed, 3 insertions, 3 deletions
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