summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--server/src/matcher/definition.lua23
1 files changed, 18 insertions, 5 deletions
diff --git a/server/src/matcher/definition.lua b/server/src/matcher/definition.lua
index cea737b3..08c37a43 100644
--- a/server/src/matcher/definition.lua
+++ b/server/src/matcher/definition.lua
@@ -127,7 +127,7 @@ function mt:searchSimple(simple)
else
if obj.index then
var = self:getField(var, obj[1])
- self:searchExp(obj)
+ self:checkVar(var, obj)
else
var = nil
end
@@ -191,10 +191,23 @@ function mt:markSimple(simple)
if tp == ':' then
self:createLocal('self', obj)
elseif tp == 'name' then
- var = self:addField(var, obj[1], {
- type = 'field',
- source = obj,
- })
+ if not obj.index then
+ var = self:addField(var, obj[1], {
+ type = 'field',
+ source = obj,
+ })
+ else
+ var = nil
+ end
+ else
+ if obj.index then
+ var = self:addField(var, obj[1], {
+ type = 'field',
+ source = obj,
+ })
+ else
+ var = nil
+ end
end
end
end