diff options
Diffstat (limited to 'server/src/matcher/references.lua')
-rw-r--r-- | server/src/matcher/references.lua | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/server/src/matcher/references.lua b/server/src/matcher/references.lua index a241025c..722156d3 100644 --- a/server/src/matcher/references.lua +++ b/server/src/matcher/references.lua @@ -4,20 +4,19 @@ local function parseResult(result, declarat) local positions = {} local tp = result.type if tp == 'local' then - for _, info in ipairs(result.object) do + for _, info in ipairs(result) do if declarat or info.type == 'get' then positions[#positions+1] = {info.source.start, info.source.finish} end end elseif tp == 'field' then - for _, info in ipairs(result.object) do + for _, info in ipairs(result) do if declarat or info.type == 'get' then positions[#positions+1] = {info.source.start, info.source.finish} end end elseif tp == 'label' then - local label = result.label - for _, info in ipairs(label) do + for _, info in ipairs(result) do if declarat or info.type == 'goto' then positions[#positions+1] = {info.source.start, info.source.finish} end @@ -29,7 +28,7 @@ local function parseResult(result, declarat) end return function (vm, pos, declarat) - local result = findResult(vm.results, pos) + local result = findResult(vm, pos) if not result then return nil end |