3838
3939--- @param functionName string
4040--- @param source parser.object
41+ --- @param bindDocsSource parser.object ? sometimes the object with the bindDocs isn ' t the function, use this to specify what has them
4142--- @param callback fun ( result : any )
4243--- @param commentId string
4344--- @param paramId string
4445--- @param returnId string
45- local function checkFunctionNamed (functionName , source , callback , commentId , paramId , returnId )
46+ local function checkFunctionNamed (functionName , source , bindDocsSource , callback , commentId , paramId , returnId )
4647 local argCount = source .args and # source .args or 0
48+ bindDocsSource = bindDocsSource or source
4749
48- if argCount == 0 and not source .returns and not source .bindDocs then
50+ if argCount == 0 and not source .returns and not bindDocsSource .bindDocs then
4951 callback {
5052 start = source .start ,
5153 finish = source .finish ,
@@ -58,7 +60,7 @@ local function checkFunctionNamed(functionName, source, callback, commentId, par
5860 local argName = arg [1 ]
5961 if argName ~= ' self'
6062 and argName ~= ' _' then
61- if not findParam (source .bindDocs , argName ) then
63+ if not findParam (bindDocsSource .bindDocs , argName ) then
6264 callback {
6365 start = arg .start ,
6466 finish = arg .finish ,
9193--- @param returnId string
9294local function checkFunction (source , callback , commentId , paramId , returnId )
9395 local functionName = source .parent [1 ]
94- checkFunctionNamed (functionName , source , callback , commentId , paramId , returnId )
96+ checkFunctionNamed (functionName , source , nil , callback , commentId , paramId , returnId )
9597end
9698
9799
101103--- @param paramId string
102104--- @param returnId string
103105local function checkMethod (source , callback , commentId , paramId , returnId )
104- local functionName = source [1 ]
105- checkFunctionNamed (functionName , source , callback , commentId , paramId , returnId )
106+ local functionName = source . method [1 ]
107+ checkFunctionNamed (functionName , source . method , source . value , callback , commentId , paramId , returnId )
106108end
107109
108110m .CheckFunction = checkFunction
0 commit comments