Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "async" key in JSON output. #2539

Merged
merged 3 commits into from
Feb 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions script/cli/doc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,12 @@ local function collectTypes(global, results)
field.rawdesc = getDesc(source, true)
field.extends = packObject(source.value)
field.visible = vm.getVisibleType(source)
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
field.deprecated = true
end
return
end
Expand Down Expand Up @@ -254,9 +257,12 @@ local function collectVars(global, results)
result.rawdesc = result.rawdesc or getDesc(set, true)
result.defines[#result.defines].extends['desc'] = getDesc(set)
result.defines[#result.defines].extends['rawdesc'] = getDesc(set, true)
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
result.defines[#result.defines].extends['deprecated'] = true
end
end
end
Expand Down
Loading