summaryrefslogtreecommitdiff
path: root/server/src/vm
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-03-12 11:08:15 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-03-12 11:08:15 +0800
commita25cadd79397ae17dc66d954a2482bf71cc6ecc2 (patch)
treefea1114d571ef9a5813a4d2bec09e284718b0a44 /server/src/vm
parent9235116d2a54052f9be43e9291d70dd4f85840ad (diff)
downloadlua-language-server-a25cadd79397ae17dc66d954a2482bf71cc6ecc2.zip
修正bug
Diffstat (limited to 'server/src/vm')
-rw-r--r--server/src/vm/value.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/server/src/vm/value.lua b/server/src/vm/value.lua
index 453c0799..fe727caf 100644
--- a/server/src/vm/value.lua
+++ b/server/src/vm/value.lua
@@ -285,4 +285,18 @@ function mt:getLiteral()
return self._literal
end
+function mt:set(name, v)
+ if not self._flag then
+ self._flag = {}
+ end
+ self._flag[name] = v
+end
+
+function mt:get(name)
+ if not self._flag then
+ return nil
+ end
+ return self._flag[name]
+end
+
return create