summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
Diffstat (limited to 'script')
-rw-r--r--script/core/hover/arg.lua5
-rw-r--r--script/core/signature.lua2
-rw-r--r--script/parser/newparser.lua1
3 files changed, 6 insertions, 2 deletions
diff --git a/script/core/hover/arg.lua b/script/core/hover/arg.lua
index 5963ad97..4e6a1ace 100644
--- a/script/core/hover/arg.lua
+++ b/script/core/hover/arg.lua
@@ -38,7 +38,10 @@ local function asFunction(source, oop)
infer.searchAndViewInfers(arg)
)
elseif arg.type == '...' then
- args[#args+1] = '...'
+ args[#args+1] = ('%s: %s'):format(
+ '...',
+ infer.searchAndViewInfers(arg)
+ )
else
args[#args+1] = ('%s'):format(infer.searchAndViewInfers(arg))
end
diff --git a/script/core/signature.lua b/script/core/signature.lua
index 57483718..d55866f5 100644
--- a/script/core/signature.lua
+++ b/script/core/signature.lua
@@ -66,7 +66,7 @@ local function makeOneSignature(source, oop, index)
if index > i and i > 0 then
local lastLabel = params[i].label
local text = label:sub(lastLabel[1] + 1, lastLabel[2])
- if text == '...' then
+ if text:sub(1, 3) == '...' then
index = i
end
end
diff --git a/script/parser/newparser.lua b/script/parser/newparser.lua
index 0b721a7a..cee6d499 100644
--- a/script/parser/newparser.lua
+++ b/script/parser/newparser.lua
@@ -2094,6 +2094,7 @@ local function parseParams(params)
start = getPosition(Tokens[Index], 'left'),
finish = getPosition(Tokens[Index] + 2, 'right'),
parent = params,
+ [1] = '...',
}
local chunk = Chunk[#Chunk]
chunk.vararg = vararg