diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-09-03 18:54:33 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-09-03 18:54:33 +0800 |
commit | bd9aacf509cf65584d56f6673f63b48974fbe018 (patch) | |
tree | d47c72a69a4f6de691924f082a8ca7b923a8d3d8 /script-beta/core/hover | |
parent | 0ee236351febdd81e4bc95ed74bc667e21d3763d (diff) | |
download | lua-language-server-bd9aacf509cf65584d56f6673f63b48974fbe018.zip |
修改library的结构,方便解析
Diffstat (limited to 'script-beta/core/hover')
-rw-r--r-- | script-beta/core/hover/label.lua | 7 | ||||
-rw-r--r-- | script-beta/core/hover/name.lua | 2 | ||||
-rw-r--r-- | script-beta/core/hover/return.lua | 2 |
3 files changed, 2 insertions, 9 deletions
diff --git a/script-beta/core/hover/label.lua b/script-beta/core/hover/label.lua index 6e5b284c..dcfc21c3 100644 --- a/script-beta/core/hover/label.lua +++ b/script-beta/core/hover/label.lua @@ -89,13 +89,6 @@ local function asField(source) return asValue(source, 'field') end -local function asLibrary(source) - local lib = source.library - if lib.type == 'function' then - return asFunction(source) - end -end - local function asString(source) local str = source[1] if type(str) ~= 'string' then diff --git a/script-beta/core/hover/name.lua b/script-beta/core/hover/name.lua index 46d79c87..0bc68c5b 100644 --- a/script-beta/core/hover/name.lua +++ b/script-beta/core/hover/name.lua @@ -56,7 +56,7 @@ local function asLibrary(source, oop) end local function buildName(source, oop) - if source.library then + if source.type == 'library' then return asLibrary(source, oop) or '' end if source.type == 'local' diff --git a/script-beta/core/hover/return.lua b/script-beta/core/hover/return.lua index be8b0e1e..031abc5c 100644 --- a/script-beta/core/hover/return.lua +++ b/script-beta/core/hover/return.lua @@ -67,7 +67,7 @@ local function asFunction(source) end return function (source) - if source.library then + if source.type == 'library' then return asLibrary(source) end if source.type == 'function' then |