summaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-03 19:28:47 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-03 19:28:47 +0800
commitab8fe19a04e3ee945401b0de0c4c62050801f1b3 (patch)
tree002c81fd55c0c3ee81dd59e6a55a6d5b636fb864 /server/src
parent14b4c403e3b423f5ee7f46438f3edea25f45ce2b (diff)
downloadlua-language-server-ab8fe19a04e3ee945401b0de0c4c62050801f1b3.zip
修正BUG
Diffstat (limited to 'server/src')
-rw-r--r--server/src/matcher/compile.lua12
1 files changed, 5 insertions, 7 deletions
diff --git a/server/src/matcher/compile.lua b/server/src/matcher/compile.lua
index 4776623b..ecfdbdd4 100644
--- a/server/src/matcher/compile.lua
+++ b/server/src/matcher/compile.lua
@@ -157,12 +157,10 @@ function mt:searchSimple(simple)
end
end
else
- if obj.index then
- if obj.type == 'string' or obj.type == 'number' or obj.type == 'boolean' then
- var = self:getField(var, obj[1], obj)
- if i ~= #simple then
- self:addInfo(var, 'get', obj)
- end
+ if obj.index and (obj.type == 'string' or obj.type == 'number' or obj.type == 'boolean') then
+ var = self:getField(var, obj[1], obj)
+ if i ~= #simple then
+ self:addInfo(var, 'get', obj)
end
else
self:searchExp(obj)
@@ -266,7 +264,7 @@ function mt:markSimple(simple)
var = nil
end
else
- if obj.index then
+ if obj.index and (obj.type == 'string' or obj.type == 'number' or obj.type == 'boolean') then
var = self:addField(var, obj[1], obj)
if i == #simple then
self:addInfo(var, 'set', obj)