summaryrefslogtreecommitdiff
path: root/server/src/core/implementation.lua
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/core/implementation.lua')
-rw-r--r--server/src/core/implementation.lua21
1 files changed, 21 insertions, 0 deletions
diff --git a/server/src/core/implementation.lua b/server/src/core/implementation.lua
index 1b8006b1..450b9a0c 100644
--- a/server/src/core/implementation.lua
+++ b/server/src/core/implementation.lua
@@ -166,6 +166,20 @@ local function jumpUri(vm, source, lsp)
return positions
end
+local function parseClass(vm, source)
+ local className = source:get 'target class'
+ local positions = {}
+ vm.emmyMgr:eachClass(className, function (class)
+ local src = class:getSource()
+ positions[#positions+1] = {
+ src.start,
+ src.finish,
+ src.uri,
+ }
+ end)
+ return positions
+end
+
return function (vm, source, lsp)
if not source then
return nil
@@ -180,4 +194,11 @@ return function (vm, source, lsp)
if source:get 'target uri' then
return jumpUri(vm, source, lsp)
end
+ if source:get 'in index' then
+ return parseValue(vm, source, lsp)
+ or parseValueSimily(vm, source, lsp)
+ end
+ if source:get 'target class' then
+ return parseClass(vm, source)
+ end
end