blob: a9e7ba13722e520226f1b737b184cfd81acb4479 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
local buildName = require 'core.hover.name'
local buildArg = require 'core.hover.arg'
local buildReturn = require 'core.hover.return'
local function asFunction(source)
local name = buildName(source)
local arg = buildArg(source)
local rtn = buildReturn(source)
return ('function %s(%s)'):format(name, arg)
end
return function (source)
if source.type == 'function' then
return asFunction(source)
end
end
|