summaryrefslogtreecommitdiff
path: root/server/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/core')
-rw-r--r--server/src/core/definition.lua19
1 files changed, 19 insertions, 0 deletions
diff --git a/server/src/core/definition.lua b/server/src/core/definition.lua
index 6685f00d..fddd8744 100644
--- a/server/src/core/definition.lua
+++ b/server/src/core/definition.lua
@@ -176,6 +176,22 @@ local function parseValueSimily(vm, source, lsp)
return positions
end
+local function parseLabel(vm, label, lsp)
+ local positions = {}
+ label:eachInfo(function (info)
+ if info.type == 'set' then
+ positions[#positions+1] = {
+ info.source.start,
+ info.source.finish,
+ }
+ end
+ end)
+ if #positions == 0 then
+ return nil
+ end
+ return positions
+end
+
return function (vm, source, lsp)
if not source then
return nil
@@ -187,4 +203,7 @@ return function (vm, source, lsp)
return parseValue(vm, source:bindValue(), lsp)
or parseValueSimily(vm, source, lsp)
end
+ if source:bindLabel() then
+ return parseLabel(vm, source:bindLabel(), lsp)
+ end
end