diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-01-30 16:14:20 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-01-30 16:14:20 +0800 |
commit | a2068e31eef72137a89dea5d701fa8447cb20ab7 (patch) | |
tree | cb825165d182cb2a8abd11496784d3db5aefe2e6 /server | |
parent | 3181ca73444cc96d78b6f1cbc06b53fbae7b1b28 (diff) | |
download | lua-language-server-a2068e31eef72137a89dea5d701fa8447cb20ab7.zip |
删除多余的代码
Diffstat (limited to 'server')
-rw-r--r-- | server/src/core/value.lua | 11 | ||||
-rw-r--r-- | server/src/method/textDocument/references.lua | 1 |
2 files changed, 4 insertions, 8 deletions
diff --git a/server/src/core/value.lua b/server/src/core/value.lua index 900d022c..ad3a48e8 100644 --- a/server/src/core/value.lua +++ b/server/src/core/value.lua @@ -145,7 +145,7 @@ function mt:getField(name, source, stack) return field end -function mt:rawEachField(callback, mark) +function mt:rawEachField(callback) if not self._child then return nil end @@ -158,11 +158,8 @@ function mt:rawEachField(callback, mark) return nil end -function mt:eachField(callback, mark, stack) - if not mark then - mark = {} - end - local res = self:rawEachField(callback, mark) +function mt:eachField(callback, stack) + local res = self:rawEachField(callback) if res ~= nil then return res end @@ -177,7 +174,7 @@ function mt:eachField(callback, mark, stack) if stack > 10 then return nil end - return indexMeta.value:eachField(callback, mark, stack) + return indexMeta.value:eachField(callback, stack) end function mt:removeUri(uri) diff --git a/server/src/method/textDocument/references.lua b/server/src/method/textDocument/references.lua index ffa4d9e3..47f7b370 100644 --- a/server/src/method/textDocument/references.lua +++ b/server/src/method/textDocument/references.lua @@ -35,7 +35,6 @@ return function (lsp, params) } } end - log.debug(table.dump(locations)) local response = locations |