diff options
-rw-r--r-- | script/core/completion/completion.lua | 6 | ||||
-rw-r--r-- | script/parser/guide.lua | 2 | ||||
-rw-r--r-- | script/vm/local-manager.lua | 40 | ||||
-rw-r--r-- | script/vm/manager.lua | 3 |
4 files changed, 0 insertions, 51 deletions
diff --git a/script/core/completion/completion.lua b/script/core/completion/completion.lua index beff594c..70e093df 100644 --- a/script/core/completion/completion.lua +++ b/script/core/completion/completion.lua @@ -186,9 +186,6 @@ local function buildFunctionSnip(source, value, oop) end local function buildDetail(source) - if source.type == 'dummy' then - return - end local types = infer.getInfer(source):view() local literals = infer.getInfer(source):viewLiterals() if literals then @@ -228,9 +225,6 @@ end ---@async local function buildDesc(source) - if source.type == 'dummy' then - return - end local desc = markdown() local hover = getHover.get(source) desc:add('md', hover) diff --git a/script/parser/guide.lua b/script/parser/guide.lua index 0ece65fc..906a9926 100644 --- a/script/parser/guide.lua +++ b/script/parser/guide.lua @@ -1027,8 +1027,6 @@ function m.getKeyType(obj) return type(obj.field[1]) elseif tp == 'doc.type.field' then return type(obj.name[1]) - elseif tp == 'dummy' then - return 'string' end if tp == 'doc.field.name' then return type(obj[1]) diff --git a/script/vm/local-manager.lua b/script/vm/local-manager.lua deleted file mode 100644 index 51bafb24..00000000 --- a/script/vm/local-manager.lua +++ /dev/null @@ -1,40 +0,0 @@ -local util = require 'utility' -local guide = require 'parser.guide' - ----@class vm.local-node -local m = {} ----@type table<uri, parser.object[]> -m.locals = util.multiTable(2) ----@type table<parser.object, table<parser.object, boolean>> -m.localSubs = util.multiTable(2, function () - return setmetatable({}, util.MODE_K) -end) ----@type table<parser.object, boolean> -m.allLocals = {} - ----@param source parser.object -function m.declareLocal(source) - if m.allLocals[source] then - return - end - m.allLocals[source] = true - local uri = guide.getUri(source) - local locals = m.locals[uri] - locals[#locals+1] = source -end - ----@param uri uri -function m.dropUri(uri) - local locals = m.locals[uri] - m.locals[uri] = nil - for _, loc in ipairs(locals) do - m.allLocals[loc] = nil - local localSubs = m.localSubs[loc] - m.localSubs[loc] = nil - for source in pairs(localSubs) do - source._node = nil - end - end -end - -return m diff --git a/script/vm/manager.lua b/script/vm/manager.lua index b5c37c35..c75b777f 100644 --- a/script/vm/manager.lua +++ b/script/vm/manager.lua @@ -1,7 +1,6 @@ local files = require 'files' local globalManager = require 'vm.global-manager' -local localManager = require 'vm.local-manager' ---@alias vm.object parser.object | vm.global | vm.generic @@ -17,7 +16,6 @@ end files.watch(function (ev, uri) if ev == 'update' then globalManager.dropUri(uri) - localManager.dropUri(uri) local state = files.getState(uri) if state then globalManager.compileAst(state.ast) @@ -25,7 +23,6 @@ files.watch(function (ev, uri) end if ev == 'remove' then globalManager.dropUri(uri) - localManager.dropUri(uri) end end) |