diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-06-26 20:52:59 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-06-26 20:52:59 +0800 |
commit | eb4cc1e5915a2ac0fceaa4f6b08f7f0f762d3fb6 (patch) | |
tree | 82ef5a990f3b43b51d03785558398a97ba3aa46f /server/src/emmy | |
parent | f92a71db462b2769eea194143f15ab090b665862 (diff) | |
download | lua-language-server-eb4cc1e5915a2ac0fceaa4f6b08f7f0f762d3fb6.zip |
用option来实现一些私有功能
Diffstat (limited to 'server/src/emmy')
-rw-r--r-- | server/src/emmy/manager.lua | 1 | ||||
-rw-r--r-- | server/src/emmy/param.lua | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/server/src/emmy/manager.lua b/server/src/emmy/manager.lua index 11aa899c..1be0be94 100644 --- a/server/src/emmy/manager.lua +++ b/server/src/emmy/manager.lua @@ -158,6 +158,7 @@ function mt:addParam(source, bind) for i = 3, #source do paramObj:addEnum(source[i][1]) end + paramObj:setOption(source.option) return paramObj end diff --git a/server/src/emmy/param.lua b/server/src/emmy/param.lua index 290ab6e4..6fd41d5a 100644 --- a/server/src/emmy/param.lua +++ b/server/src/emmy/param.lua @@ -47,6 +47,14 @@ function mt:eachEnum(callback) end end +function mt:setOption(option) + self._option = option +end + +function mt:getOption() + return self._option +end + return function (manager, source) local self = setmetatable({ source = source.id, |