diff options
-rw-r--r-- | script/core/diagnostics/undefined-doc-name.lua | 13 | ||||
-rw-r--r-- | script/parser/guide.lua | 2 |
2 files changed, 3 insertions, 12 deletions
diff --git a/script/core/diagnostics/undefined-doc-name.lua b/script/core/diagnostics/undefined-doc-name.lua index 3c8ed469..1c55f3bf 100644 --- a/script/core/diagnostics/undefined-doc-name.lua +++ b/script/core/diagnostics/undefined-doc-name.lua @@ -13,16 +13,6 @@ return function (uri, callback) return end - local function hasNameOfGeneric(name, source) - if not source.typeGeneric then - return false - end - if not source.typeGeneric[name] then - return false - end - return true - end - guide.eachSource(state.ast.docs, function (source) if source.type ~= 'doc.extends.name' and source.type ~= 'doc.type.name' then @@ -35,8 +25,7 @@ return function (uri, callback) if name == '...' or name == '_' or name == 'self' then return end - if #vm.getDocSets(uri, name) > 0 - or hasNameOfGeneric(name, source) then + if #vm.getDocSets(uri, name) > 0 then return end callback { diff --git a/script/parser/guide.lua b/script/parser/guide.lua index a2a0c232..ac7a5ce0 100644 --- a/script/parser/guide.lua +++ b/script/parser/guide.lua @@ -74,6 +74,8 @@ local type = type ---@field hasBreak? true ---@field hasExit? true ---@field [integer] parser.object|any +---@field dot { type: string, start: integer, finish: integer } +---@field colon { type: string, start: integer, finish: integer } ---@field package _root parser.object ---@field package _eachCache? parser.object[] ---@field package _isGlobal? boolean |