Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
sumneko committed Jan 24, 2024
1 parent 89edbfa commit b780666
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion script/parser/guide.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ local type = type
---@field type string
---@field special string
---@field tag string
---@field args { [integer]: parser.object, start: integer, finish: integer }
---@field args { [integer]: parser.object, start: integer, finish: integer, type: string }
---@field locals parser.object[]
---@field returns? parser.object[]
---@field breaks? parser.object[]
Expand Down
4 changes: 3 additions & 1 deletion script/parser/luadoc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2106,11 +2106,13 @@ local function luadoc(state)
end
end
end

if ast.state.pluginDocs then
for i, doc in ipairs(ast.state.pluginDocs) do
insertDoc(doc, doc.originalComment)
end
---@param a unknown
---@param b unknown
table.sort(ast.docs, function (a, b)
return a.start < b.start
end)
Expand Down
2 changes: 1 addition & 1 deletion script/plugins/astHelper.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ end
function _M.addClassDocAtParam(ast, classname, source, index)
local arg = _M.removeArg(source, index)
if arg then
return _M.addClassDoc(ast, arg, classname), arg
return not not _M.addClassDoc(ast, arg, classname), arg
end
return false
end
Expand Down
3 changes: 0 additions & 3 deletions script/workspace/scope.lua
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,6 @@ function mt:set(k, v)
return v
end

---@generic T
---@param k `T`
---@return T
function mt:get(k)
return self._data[k]
end
Expand Down

0 comments on commit b780666

Please sign in to comment.