summaryrefslogtreecommitdiff
path: root/server/src/vm/local.lua
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-04-18 11:42:45 +0800
committersumneko <sumneko@hotmail.com>2019-04-18 11:42:45 +0800
commit04c3ce15f1515b11e43e4630888e323c6372b409 (patch)
treecfd2659fdaac0499416f8bf1406641f35edd6cb2 /server/src/vm/local.lua
parent1c0416baecc6db9720beb18d5abfc3b7ef33ffbe (diff)
downloadlua-language-server-04c3ce15f1515b11e43e4630888e323c6372b409.zip
emmy.class
Diffstat (limited to 'server/src/vm/local.lua')
-rw-r--r--server/src/vm/local.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/server/src/vm/local.lua b/server/src/vm/local.lua
index 0da5112f..e75ed149 100644
--- a/server/src/vm/local.lua
+++ b/server/src/vm/local.lua
@@ -19,6 +19,9 @@ function mt:setValue(value)
else
self.value = value
end
+ if self._emmy then
+ self.value:setEmmy(self._emmy)
+ end
return value
end
@@ -126,6 +129,19 @@ function mt:getSource()
return listMgr.get(self.source)
end
+function mt:setEmmy(emmy)
+ if not emmy then
+ return
+ end
+ if emmy.type ~= 'emmy.class' and emmy.type ~= 'emmy.type' then
+ return
+ end
+ self._emmy = emmy
+ if self.value then
+ self.value:setEmmy(emmy)
+ end
+end
+
local function create(name, source, value)
if not value then
error('Local must has a value')