summaryrefslogtreecommitdiff
path: root/server/src/emmy/manager.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-07-04 20:08:33 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-07-04 20:08:33 +0800
commit3c94aec07eade30f914387d220a6f4d1d332ba01 (patch)
treec257fecd5a10680f628ef17e1bdc818a4de8e1f9 /server/src/emmy/manager.lua
parent349fd77669c380777b77e9b8cebfa4624a68e17c (diff)
parent54453139868cdef82406b5868a9f78bc0838b6f7 (diff)
downloadlua-language-server-3c94aec07eade30f914387d220a6f4d1d332ba01.zip
Merge commit '54453139868cdef82406b5868a9f78bc0838b6f7'
Diffstat (limited to 'server/src/emmy/manager.lua')
-rw-r--r--server/src/emmy/manager.lua15
1 files changed, 9 insertions, 6 deletions
diff --git a/server/src/emmy/manager.lua b/server/src/emmy/manager.lua
index 72867b1a..9b6978b9 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])
end
return aliasObj
end
@@ -156,17 +156,20 @@ function mt:addParam(source, bind)
end)
end
for i = 3, #source do
- paramObj:addEnum(source[i][1])
+ paramObj:addEnum(source[i])
end
+ paramObj:setOption(source.option)
return paramObj
end
function mt:addReturn(source, bind)
local returnObj = newReturn(self, source)
- if bind.type == 'emmy.generic' then
- returnObj:bindGeneric(bind)
- else
- returnObj:bindType(bind)
+ if bind then
+ if bind.type == 'emmy.generic' then
+ returnObj:bindGeneric(bind)
+ else
+ returnObj:bindType(bind)
+ end
end
return returnObj
end