summaryrefslogtreecommitdiff
path: root/server/src/matcher/vm.lua
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/matcher/vm.lua')
-rw-r--r--server/src/matcher/vm.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/server/src/matcher/vm.lua b/server/src/matcher/vm.lua
index 48a8a49c..de55c12e 100644
--- a/server/src/matcher/vm.lua
+++ b/server/src/matcher/vm.lua
@@ -114,6 +114,11 @@ function mt:addInfo(obj, type, source)
else
self.results.sources[source] = obj
end
+ if type == 'set' or type == 'return' then
+ if not obj.declarat then
+ obj.declarat = source
+ end
+ end
end
return obj
end
@@ -262,9 +267,6 @@ function mt:setValue(var, value, source)
if source and source.start then
self:addInfo(var, 'set', source)
self:addInfo(value, 'set', source)
- if not value.declarat then
- value.declarat = source
- end
end
return value
end