diff options
Diffstat (limited to 'server-beta/src')
-rw-r--r-- | server-beta/src/core/hover/label.lua | 6 | ||||
-rw-r--r-- | server-beta/src/core/hover/return.lua | 14 |
2 files changed, 18 insertions, 2 deletions
diff --git a/server-beta/src/core/hover/label.lua b/server-beta/src/core/hover/label.lua index 1dc66fc5..a9e7ba13 100644 --- a/server-beta/src/core/hover/label.lua +++ b/server-beta/src/core/hover/label.lua @@ -1,9 +1,11 @@ -local buildName = require 'core.hover.name' -local buildArg = require 'core.hover.arg' +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 diff --git a/server-beta/src/core/hover/return.lua b/server-beta/src/core/hover/return.lua new file mode 100644 index 00000000..dbc3df85 --- /dev/null +++ b/server-beta/src/core/hover/return.lua @@ -0,0 +1,14 @@ +local guide = require 'parser.guide' +local vm = require 'vm' + +local function asFunction(source) + if not source.returns then + return nil + end +end + +return function (source) + if source.type == 'function' then + return asFunction(source) + end +end |