summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-11-30 15:34:22 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-11-30 15:34:22 +0800
commit136fe2532b763534c24714db677b12405a1b3712 (patch)
treee920567ab85d5fa1e2228d59ef919c71675ebcbe /server
parent71a267d42d6a28dcf1333092d57714f274fc698d (diff)
downloadlua-language-server-136fe2532b763534c24714db677b12405a1b3712.zip
修正bug
Diffstat (limited to 'server')
-rw-r--r--server/src/matcher/definition.lua10
-rw-r--r--server/test/definition/table.lua6
2 files changed, 9 insertions, 7 deletions
diff --git a/server/src/matcher/definition.lua b/server/src/matcher/definition.lua
index a7e51121..236e4924 100644
--- a/server/src/matcher/definition.lua
+++ b/server/src/matcher/definition.lua
@@ -65,10 +65,10 @@ function mt:getField(parent, key, source)
if parent == nil or key == nil then
return nil
end
- if not parent.childs then
- return nil
+ local var
+ if parent.childs then
+ var = parent.childs[key]
end
- local var = parent.childs[key]
if not var then
var = self:addField(parent, key, source)
end
@@ -100,7 +100,6 @@ function mt:checkDots(dots)
type = 'dots',
dots = dots,
}
- self.stop = true
end
end
end
@@ -403,9 +402,6 @@ end
function mt:searchActions(actions)
for _, action in ipairs(actions) do
self:searchAction(action)
- if self.stop then
- return self.result
- end
end
return nil
end
diff --git a/server/test/definition/table.lua b/server/test/definition/table.lua
index 3f23ed3a..67fac169 100644
--- a/server/test/definition/table.lua
+++ b/server/test/definition/table.lua
@@ -88,3 +88,9 @@ t {
_ = <?t?>.x
}
]]
+
+TEST[[
+local t
+t.<?after?>()
+t.<!after!> = a
+]]