diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-03-22 11:24:37 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-03-22 11:24:37 +0800 |
commit | 5b584a6f9607221db888ed5ccbb93809006f2746 (patch) | |
tree | 243c60a2284f8c75dee8e7ec1166dac0665357a8 /server | |
parent | c0cb126d73007c618e2887776a04f94882ad6021 (diff) | |
download | lua-language-server-5b584a6f9607221db888ed5ccbb93809006f2746.zip |
去掉一个冗余标记
Diffstat (limited to 'server')
-rw-r--r-- | server/src/core/definition.lua | 15 | ||||
-rw-r--r-- | server/src/vm/function.lua | 1 |
2 files changed, 8 insertions, 8 deletions
diff --git a/server/src/core/definition.lua b/server/src/core/definition.lua index 9b4b7233..b348a386 100644 --- a/server/src/core/definition.lua +++ b/server/src/core/definition.lua @@ -95,11 +95,12 @@ end local function parseLocal(vm, source, lsp) local positions = {} local loc = source:bindLocal() - if loc:get 'arg' then + local locSource = loc:getSource() + if locSource:get 'arg' then positions[#positions+1] = { - loc:get 'arg'.start, - loc:get 'arg'.finish, - loc:get 'arg':getUri(), + locSource.start, + locSource.finish, + locSource:getUri(), } return positions end @@ -108,9 +109,9 @@ local function parseLocal(vm, source, lsp) return parseValueCrossFile(vm, source, lsp) end positions[#positions+1] = { - loc:getSource().start, - loc:getSource().finish, - loc:getSource():getUri(), + locSource.start, + locSource.finish, + locSource:getUri(), } if #positions == 0 then return nil diff --git a/server/src/vm/function.lua b/server/src/vm/function.lua index 0c13b840..973f984e 100644 --- a/server/src/vm/function.lua +++ b/server/src/vm/function.lua @@ -196,7 +196,6 @@ 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 |