summaryrefslogtreecommitdiff
path: root/script-beta/core/hover/label.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script-beta/core/hover/label.lua')
-rw-r--r--script-beta/core/hover/label.lua35
1 files changed, 7 insertions, 28 deletions
diff --git a/script-beta/core/hover/label.lua b/script-beta/core/hover/label.lua
index 12c175cd..57b2ee8e 100644
--- a/script-beta/core/hover/label.lua
+++ b/script-beta/core/hover/label.lua
@@ -19,36 +19,15 @@ end
local function asValue(source, title)
local name = buildName(source)
local class = 'any'
- local type = 'any'
- local literal = ''
- local cont
local infers = vm.getInfers(source)
- if infers then
- for _, value in ipairs(infers) do
- local src = value.source
- local tp = value.type
- class = guide.mergeTypes {class, vm.getClass(src)}
- type = guide.mergeTypes {type, tp}
- local sl = guide.getLiteral(src)
- if sl then
- literal = guide.mergeTypes {literal, util.viewLiteral(sl)}
- end
- if tp == 'table' then
- cont = buildTable(src)
- end
- end
+ local type = vm.getType(source)
+ local literal = vm.getLiteral(source)
+ local cont
+ if vm.hasType(source, 'table') then
+ cont = buildTable(source)
end
- vm.eachDef(source, function (src)
- class = guide.mergeTypes {class, vm.getClass(src)}
- type = guide.mergeTypes {type, vm.getType(src)}
- local sl = guide.getLiteral(src)
- if sl then
- literal = guide.mergeTypes {literal, util.viewLiteral(sl)}
- end
- if type == 'table' then
- cont = buildTable(src)
- end
- end)
+ --vm.eachDef(source, function (src)
+ --end)
local pack = {}
pack[#pack+1] = title
pack[#pack+1] = name .. ':'