diff options
author | sumneko <sumneko@hotmail.com> | 2019-04-29 19:45:38 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2019-04-29 19:45:38 +0800 |
commit | f2444b757331ddf8df16a39a86b0ce8608338d77 (patch) | |
tree | 65617574b497e87886470e6b504584fe099cbcd5 /server/src/emmy/generic.lua | |
parent | 1ec748aaa45599cb4487105842a1ad4cb5e7a2b4 (diff) | |
download | lua-language-server-f2444b757331ddf8df16a39a86b0ce8608338d77.zip |
emmy.generic
Diffstat (limited to 'server/src/emmy/generic.lua')
-rw-r--r-- | server/src/emmy/generic.lua | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/server/src/emmy/generic.lua b/server/src/emmy/generic.lua new file mode 100644 index 00000000..d47ee585 --- /dev/null +++ b/server/src/emmy/generic.lua @@ -0,0 +1,27 @@ +local listMgr = require 'vm.list' + +---@class EmmyGeneric +local mt = {} +mt.__index = mt +mt.type = 'emmy.generic' + +function mt:getName() + return self.name +end + +function mt:setValue(value) + self._value = value +end + +function mt:getValue() + return self._value +end + +return function (manager, defs) + for _, def in ipairs(defs) do + setmetatable(def, mt) + def._manager = manager + def._binds = {} + end + return defs +end |