@@ -4,31 +4,18 @@ local vm = require 'vm.vm'
44local await = require ' await'
55local guide = require ' parser.guide'
66
7- local function getFieldEventName (doc )
7+ local function isDocFunc (doc )
88 if not doc .extends then
9- return nil
9+ return false
1010 end
1111 if # doc .extends .types ~= 1 then
12- return nil
12+ return false
1313 end
1414 local docFunc = doc .extends .types [1 ]
1515 if docFunc .type ~= ' doc.type.function' then
16- return nil
16+ return false
1717 end
18- for i = 1 , # docFunc .args do
19- local arg = docFunc .args [i ]
20- if arg
21- and arg .extends
22- and # arg .extends .types == 1 then
23- local literal = arg .extends .types [1 ]
24- if literal .type == ' doc.type.boolean'
25- or literal .type == ' doc.type.string'
26- or literal .type == ' doc.type.integer' then
27- return (' %q' ):format (literal [1 ])
28- end
29- end
30- end
31- return nil
18+ return true
3219end
3320
3421--- @async
@@ -47,14 +34,11 @@ return function (uri, callback)
4734 --- @param field parser.object
4835 --- @return string ?
4936 local function viewKey (field )
37+ if isDocFunc (field ) then
38+ return nil
39+ end
5040 if not cachedKeys [field ] then
5141 local view = vm .viewKey (field , uri )
52- if view then
53- local eventName = getFieldEventName (field )
54- if eventName then
55- view = view .. ' |' .. eventName
56- end
57- end
5842 cachedKeys [field ] = view or false
5943 end
6044 return cachedKeys [field ] or nil
0 commit comments