summaryrefslogtreecommitdiff
path: root/server/src/matcher/compile.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-05 17:22:11 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-05 17:22:11 +0800
commit3221c785e48107a6199fa601f3f44ffaf8d6e8f9 (patch)
treef892906f63ddbcc5212400d12b1e59bd3534f6d0 /server/src/matcher/compile.lua
parent34c2d6ac30f9d990d4008f52c6436aae68fb2844 (diff)
downloadlua-language-server-3221c785e48107a6199fa601f3f44ffaf8d6e8f9.zip
查找引用
Diffstat (limited to 'server/src/matcher/compile.lua')
-rw-r--r--server/src/matcher/compile.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/src/matcher/compile.lua b/server/src/matcher/compile.lua
index eb85bc61..4e0018a9 100644
--- a/server/src/matcher/compile.lua
+++ b/server/src/matcher/compile.lua
@@ -62,6 +62,7 @@ function mt:createLocal(key, source, var)
end
if not var then
var = self:createVar('local', key, source)
+ self:addInfo(var, 'local', source)
end
self.env.var[key] = var
return var
@@ -514,7 +515,7 @@ return function (ast)
}
}, mt)
searcher.env.label = {}
- searcher:createLocal('_ENV')
+ searcher:createLocal('_ENV', { start = -1, finish = -1 })
searcher:searchActions(ast)
return searcher.results