summaryrefslogtreecommitdiff
path: root/script-beta/core/hover/class.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-01-09 17:12:54 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-01-09 17:12:54 +0800
commit73244793bda51290b1028ab1f764867f33cabbc5 (patch)
tree5592fbf14f60016270dcca75190508ff89a3213f /script-beta/core/hover/class.lua
parenta6148c4a1488525c9ddc60c3769479642f2b3c9d (diff)
downloadlua-language-server-73244793bda51290b1028ab1f764867f33cabbc5.zip
整理代码
Diffstat (limited to 'script-beta/core/hover/class.lua')
-rw-r--r--script-beta/core/hover/class.lua28
1 files changed, 0 insertions, 28 deletions
diff --git a/script-beta/core/hover/class.lua b/script-beta/core/hover/class.lua
deleted file mode 100644
index 5472ba7f..00000000
--- a/script-beta/core/hover/class.lua
+++ /dev/null
@@ -1,28 +0,0 @@
-local vm = require 'vm'
-
-local function getClass(source, deep)
- if deep > 3 then
- return nil
- end
- local classes = {}
- vm.eachField(source, function (src)
- local key = vm.getKeyName(src)
- local lkey = key:lower()
- if lkey == 's|type'
- or lkey == 's|__name'
- or lkey == 's|name'
- or lkey == 's|class' then
- if src.value and src.value.type == 'string' then
- classes[#classes+1] = src.value[1]
- end
- end
- end)
- if #classes == 0 then
- return
- end
- return vm.mergeTypeViews(table.unpack(classes))
-end
-
-return function (source)
- return getClass(source, 1)
-end