Skip to content
Snippets Groups Projects
Commit 1229bb27 authored by 最萌小汐's avatar 最萌小汐
Browse files

stack

parent 2dc07de0
No related branches found
No related tags found
No related merge requests found
...@@ -822,20 +822,23 @@ function m.lineData(lines, row) ...@@ -822,20 +822,23 @@ function m.lineData(lines, row)
return lines[row] return lines[row]
end end
local isSetMap = {
['setglobal'] = true,
['local'] = true,
['setlocal'] = true,
['setfield'] = true,
['setmethod'] = true,
['setindex'] = true,
['tablefield'] = true,
['tableindex'] = true,
['tableexp'] = true,
['doc.field.name'] = true,
['doc.field'] = true,
['doc.type.field'] = true,
}
function m.isSet(source) function m.isSet(source)
local tp = source.type local tp = source.type
if tp == 'setglobal' if isSetMap[tp] then
or tp == 'local'
or tp == 'setlocal'
or tp == 'setfield'
or tp == 'setmethod'
or tp == 'setindex'
or tp == 'tablefield'
or tp == 'tableindex'
or tp == 'tableexp'
or tp == 'doc.field.name'
or tp == 'doc.field'
or tp == 'doc.type.field' then
return true return true
end end
if tp == 'call' then if tp == 'call' then
...@@ -847,13 +850,16 @@ function m.isSet(source) ...@@ -847,13 +850,16 @@ function m.isSet(source)
return false return false
end end
local isGetMap = {
['getglobal'] = true,
['getlocal'] = true,
['getfield'] = true,
['getmethod'] = true,
['getindex'] = true,
}
function m.isGet(source) function m.isGet(source)
local tp = source.type local tp = source.type
if tp == 'getglobal' if isGetMap[tp] then
or tp == 'getlocal'
or tp == 'getfield'
or tp == 'getmethod'
or tp == 'getindex' then
return true return true
end end
if tp == 'call' then if tp == 'call' then
......
...@@ -91,7 +91,7 @@ local function main() ...@@ -91,7 +91,7 @@ local function main()
--config.Lua.intelliSense.searchDepth = 5 --config.Lua.intelliSense.searchDepth = 5
--loadDocMetas() --loadDocMetas()
test 'full' --test 'full'
require 'bee.platform'.OS = 'Windows' require 'bee.platform'.OS = 'Windows'
testAll() testAll()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment