From 9cd44e1b61fa8f002b211224e0141812a8fc97e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Fri, 20 Nov 2020 19:10:30 +0800 Subject: stage --- script-beta/core/hover/name.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'script-beta/core/hover/name.lua') diff --git a/script-beta/core/hover/name.lua b/script-beta/core/hover/name.lua index e5bd6f66..ee8b3961 100644 --- a/script-beta/core/hover/name.lua +++ b/script-beta/core/hover/name.lua @@ -84,6 +84,10 @@ local function asDocFunction(source) return '' end +local function asDocField(source) + return source.field[1] +end + function buildName(source, oop) if oop == nil then oop = source.type == 'setmethod' @@ -117,6 +121,9 @@ function buildName(source, oop) if source.type == 'doc.type.function' then return asDocFunction(source) end + if source.type == 'doc.field' then + return asDocField(source) + end local parent = source.parent if parent then return buildName(parent, oop) -- cgit v1.2.3