summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-01-29 09:51:42 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-01-29 09:51:42 +0800
commit70e4776a011ce894d9aedafc4108d9e175f41b80 (patch)
tree585d031ed203543bbc2eee391a56214c98228911
parentdaa0b48c627cb1ed15a65e7e6330ca6c81627510 (diff)
downloadlua-language-server-70e4776a011ce894d9aedafc4108d9e175f41b80.zip
代码没用了
-rw-r--r--server/src/core/vm.lua82
1 files changed, 0 insertions, 82 deletions
diff --git a/server/src/core/vm.lua b/server/src/core/vm.lua
index 98778e49..004e40f9 100644
--- a/server/src/core/vm.lua
+++ b/server/src/core/vm.lua
@@ -241,88 +241,6 @@ function mt:buildTable(source)
return tbl
end
-function mt:mergeValue(a, b, mark)
- if a == b then
- return
- end
- if not mark then
- mark = {}
- end
- if mark[a] or mark[b] then
- return
- end
- if a.uri ~= self.uri then
- return
- end
- mark[a] = true
- mark[b] = true
- self:mergeChild(a, b, mark)
- for k in pairs(a) do
- a[k] = nil
- end
- for k, v in pairs(b) do
- a[k] = v
- end
-end
-
-function mt:mergeField(a, b, mark)
- if a == b then
- return
- end
- if not mark then
- mark = {}
- end
- for i, info in ipairs(a) do
- a[i] = nil
- b[#b+1] = info
- end
- for i, v in ipairs(b) do
- a[i] = v
- end
- self:mergeValue(a:getValue(), b:getValue(), mark)
-end
-
-function mt:mergeChild(a, b, mark)
- if a == b then
- return
- end
- if not a.child and not b.child then
- return
- end
- if not mark then
- mark = {}
- end
- if a.uri ~= self.uri then
- return
- end
- if b.uri == self.uri then
- local child = a.child or orderTable()
- local other = b.child or orderTable()
- a.child = nil
- b.child = nil
- for k, v in pairs(other) do
- if child[k] then
- self:mergeField(child[k], v, mark)
- else
- child[k] = v
- end
- end
- a.child = child
- b.child = child
- else
- local child = a.child or orderTable()
- local other = b.child
- if not other then
- return
- end
- a.child = nil
- for k, v in pairs(other) do
- child[k] = v
- end
- a.child = child
- end
-end
-
function mt:setValue(var, value, source)
if value and value.type == 'list' then
error('Cant set value list')