summaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
Diffstat (limited to 'server/src')
-rw-r--r--server/src/core/definition.lua10
-rw-r--r--server/src/vm/function.lua1
2 files changed, 10 insertions, 1 deletions
diff --git a/server/src/core/definition.lua b/server/src/core/definition.lua
index e240e614..341a363f 100644
--- a/server/src/core/definition.lua
+++ b/server/src/core/definition.lua
@@ -93,12 +93,20 @@ local function parseValueCrossFile(vm, source, lsp)
end
local function parseLocal(vm, source, lsp)
+ local positions = {}
local loc = source:bindLocal()
+ if loc:get 'arg' then
+ positions[#positions+1] = {
+ loc:get 'arg'.start,
+ loc:get 'arg'.finish,
+ loc:get 'arg':getUri(),
+ }
+ return positions
+ end
local value = source:bindValue()
if value.uri ~= '' and value.uri ~= vm.uri then
return parseValueCrossFile(vm, source, lsp)
end
- local positions = {}
positions[#positions+1] = {
loc:getSource().start,
loc:getSource().finish,
diff --git a/server/src/vm/function.lua b/server/src/vm/function.lua
index 973f984e..0c13b840 100644
--- a/server/src/vm/function.lua
+++ b/server/src/vm/function.lua
@@ -196,6 +196,7 @@ function mt:createArg(vm, arg)
arg:set('arg', true)
if arg.type == 'name' then
local loc = createLocal(arg[1], arg, createValue('nil', arg))
+ loc:set('arg', arg)
self:saveLocal(arg[1], loc)
self.args[#self.args+1] = loc
elseif arg.type == '...' then