diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-03 19:28:47 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-03 19:28:47 +0800 |
commit | ab8fe19a04e3ee945401b0de0c4c62050801f1b3 (patch) | |
tree | 002c81fd55c0c3ee81dd59e6a55a6d5b636fb864 /server/src | |
parent | 14b4c403e3b423f5ee7f46438f3edea25f45ce2b (diff) | |
download | lua-language-server-ab8fe19a04e3ee945401b0de0c4c62050801f1b3.zip |
修正BUG
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/matcher/compile.lua | 12 |
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) |