summaryrefslogtreecommitdiff
path: root/server/src/emmy/manager.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-06-27 21:16:49 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-06-27 21:16:49 +0800
commit92aa3d6c203aef82a57efbe8216830a016db6d5e (patch)
treebc40905c5acd1ce368a468897345fcb40a5a04da /server/src/emmy/manager.lua
parentca19e2ea1d6df45e7e2fa1ac7bd910e083a13600 (diff)
downloadlua-language-server-92aa3d6c203aef82a57efbe8216830a016db6d5e.zip
偷偷支持新的 EmmyEnum
Diffstat (limited to 'server/src/emmy/manager.lua')
-rw-r--r--server/src/emmy/manager.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/src/emmy/manager.lua b/server/src/emmy/manager.lua
index 1be0be94..931c9449 100644
--- a/server/src/emmy/manager.lua
+++ b/server/src/emmy/manager.lua
@@ -136,7 +136,7 @@ function mt:addAlias(source, typeObj)
local list = self:getClass(aliasName)
list[source.id] = aliasObj
for i = 3, #source do
- aliasObj:addEnum(source[i][1])
+ aliasObj:addEnum(source[i][1][1], source[i].option)
end
return aliasObj
end
@@ -149,14 +149,14 @@ function mt:addParam(source, bind)
paramObj:bindType(bind)
self:eachClass(bind:getName(), function (class)
if class.type == 'emmy.alias' then
- class:eachEnum(function (enum)
- paramObj:addEnum(enum)
+ class:eachEnum(function (enum, option)
+ paramObj:addEnum(enum, option)
end)
end
end)
end
for i = 3, #source do
- paramObj:addEnum(source[i][1])
+ paramObj:addEnum(source[i][1][1], source[i].option)
end
paramObj:setOption(source.option)
return paramObj