summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-01-30 16:14:20 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-01-30 16:14:20 +0800
commita2068e31eef72137a89dea5d701fa8447cb20ab7 (patch)
treecb825165d182cb2a8abd11496784d3db5aefe2e6 /server
parent3181ca73444cc96d78b6f1cbc06b53fbae7b1b28 (diff)
downloadlua-language-server-a2068e31eef72137a89dea5d701fa8447cb20ab7.zip
删除多余的代码
Diffstat (limited to 'server')
-rw-r--r--server/src/core/value.lua11
-rw-r--r--server/src/method/textDocument/references.lua1
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