diff options
author | sumneko <sumneko@hotmail.com> | 2019-05-05 20:06:08 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2019-05-05 20:06:08 +0800 |
commit | 6b95bb52f39082e9df605a954cb6a16d75b9611c (patch) | |
tree | c425335076a50e90f28f3c42ab825fb6c042c13b /server/src/vm/local.lua | |
parent | e00842cf43b6d2e2ff3900db32d3aa4e18a8f800 (diff) | |
download | lua-language-server-6b95bb52f39082e9df605a954cb6a16d75b9611c.zip |
emmyFunctionçš„hover
Diffstat (limited to 'server/src/vm/local.lua')
-rw-r--r-- | server/src/vm/local.lua | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/server/src/vm/local.lua b/server/src/vm/local.lua index ce47414a..5b936625 100644 --- a/server/src/vm/local.lua +++ b/server/src/vm/local.lua @@ -136,18 +136,19 @@ function mt:getSource() return listMgr.get(self.source) end +local EMMY_TYPE = { + ['emmy.class'] = true, + ['emmy.type'] = true, + ['emmy.arrayType'] = true, + ['emmy.tableType'] = true, + ['emmy.functionType'] = true, +} + function mt:setEmmy(emmy) if not emmy then return end - if emmy.type ~= 'emmy.class' - and emmy.type ~= 'emmy.type' - and emmy.type ~= 'emmy.arrayType' - and emmy.type ~= 'emmy.tableType' - then - return - end - if self.value then + if self.value and EMMY_TYPE[emmy.type] then self.value:setEmmy(emmy) end end |