From afcbe82612a1fa4ac05d03fe557472d52ce2984a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 17 Dec 2019 15:37:16 +0800 Subject: =?UTF-8?q?=E8=BF=87=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script-beta/core/definition.lua | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'script-beta/core/definition.lua') diff --git a/script-beta/core/definition.lua b/script-beta/core/definition.lua index 77bef643..8afdc2ba 100644 --- a/script-beta/core/definition.lua +++ b/script-beta/core/definition.lua @@ -22,8 +22,7 @@ local function findDef(source, callback) return end if info.mode == 'declare' - or info.mode == 'set' - or info.mode == 'return' then + or info.mode == 'set' then local src = info.source local root = guide.getRoot(src) local uri = root.uri @@ -42,6 +41,14 @@ local function findDef(source, callback) callback(src, uri) end end + if info.mode == 'value' then + local src = info.source + local root = guide.getRoot(src) + local uri = root.uri + if src.parent.type == 'return' then + callback(src, uri) + end + end end) end -- cgit v1.2.3