summaryrefslogtreecommitdiff
path: root/server/src/core
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-05-06 14:48:44 +0800
committersumneko <sumneko@hotmail.com>2019-05-06 14:48:44 +0800
commitdf62d7a467cc2ffa1d4945c4912a4568baf75847 (patch)
treebc9329d5eb349cea72ab1f660d9ed7c7d2af620a /server/src/core
parentcbd5169adaed554fe5ae3b2c9f4141039c2082cd (diff)
downloadlua-language-server-df62d7a467cc2ffa1d4945c4912a4568baf75847.zip
emmySee
Diffstat (limited to 'server/src/core')
-rw-r--r--server/src/core/definition.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/server/src/core/definition.lua b/server/src/core/definition.lua
index 4ed70bc4..c2a29dae 100644
--- a/server/src/core/definition.lua
+++ b/server/src/core/definition.lua
@@ -179,6 +179,18 @@ local function parseClass(callback, vm, source)
end)
end
+local function parseSee(callback, vm, source)
+ local see = source:get 'emmy see'
+ local className = see[1][1]
+ local childName = see[2][1]
+ vm.emmyMgr:eachClass(className, function (class)
+ ---@type value
+ local value = class:getValue()
+ local child = value:getChild(childName)
+ parseValueByValue(callback, vm, source, child)
+ end)
+end
+
local function parseFunction(callback, vm, source)
if Mode == 'definition' then
callback(source:bindFunction():getSource())
@@ -260,6 +272,9 @@ return function (vm, pos, mode)
if source:get 'emmy class' then
parseClass(callback, vm, source)
end
+ if source:get 'emmy see' then
+ parseSee(callback, vm, source)
+ end
if #list == 0 then
parseValueSimily(callback, vm, source)