diff options
Diffstat (limited to 'script/vm/ref.lua')
-rw-r--r-- | script/vm/ref.lua | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/script/vm/ref.lua b/script/vm/ref.lua index 9c248684..89b9d3c0 100644 --- a/script/vm/ref.lua +++ b/script/vm/ref.lua @@ -107,29 +107,28 @@ local function searchWord(source, pushResult, defMap, fileNotify) await.delay() end end) - else - ---@async - guide.eachSourceTypes(state.ast, {'getfield', 'setfield'}, function (src) - if src.field and src.field[1] == key then - checkDef(src) - await.delay() - end - end) - ---@async - guide.eachSourceTypes(state.ast, {'getmethod', 'setmethod'}, function (src) - if src.method and src.method[1] == key then - checkDef(src) - await.delay() - end - end) - ---@async - guide.eachSourceTypes(state.ast, {'getindex', 'setindex'}, function (src) - if src.index and src.index.type == 'string' and src.index[1] == key then - checkDef(src) - await.delay() - end - end) end + ---@async + guide.eachSourceTypes(state.ast, {'getfield', 'setfield'}, function (src) + if src.field and src.field[1] == key then + checkDef(src) + await.delay() + end + end) + ---@async + guide.eachSourceTypes(state.ast, {'getmethod', 'setmethod'}, function (src) + if src.method and src.method[1] == key then + checkDef(src) + await.delay() + end + end) + ---@async + guide.eachSourceTypes(state.ast, {'getindex', 'setindex'}, function (src) + if src.index and src.index.type == 'string' and src.index[1] == key then + checkDef(src) + await.delay() + end + end) end searchInAllFiles(guide.getUri(source), findWord, fileNotify) |