From a2068e31eef72137a89dea5d701fa8447cb20ab7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 30 Jan 2019 16:14:20 +0800 Subject: =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=A4=9A=E4=BD=99=E7=9A=84=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/core/value.lua | 11 ++++------- 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 -- cgit v1.2.3