Skip to content

Commit

Permalink
Add "deprecated" key in JSON output.
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasMatthias committed Feb 26, 2024
1 parent beacc21 commit d0bfdaa
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions script/cli/doc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@ local function collectTypes(global, results)
if vm.isAsync(source, true) then
field.async = true
end
local depr = vm.getDeprecated(source)
if (depr and not depr.versions) then
field.deprecated = true
end
return
end
if source.type == 'tableindex' then
Expand Down Expand Up @@ -256,6 +260,10 @@ local function collectVars(global, results)
if vm.isAsync(set, true) then
result.defines[#result.defines].extends['async'] = true
end
local depr = vm.getDeprecated(set)
if (depr and not depr.versions) then
result.defines[#result.defines].extends['deprecated'] = true
end
end
end
if #result.defines == 0 then
Expand Down

0 comments on commit d0bfdaa

Please sign in to comment.