From d0bfdaa6aa1f75b45f4eeeaabb7de1e0a99075bf Mon Sep 17 00:00:00 2001 From: Andreas Date: Mon, 26 Feb 2024 14:35:19 +0100 Subject: Add "deprecated" key in JSON output. --- script/cli/doc.lua | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'script/cli') diff --git a/script/cli/doc.lua b/script/cli/doc.lua index 7f7d38e3..7e7c8534 100644 --- a/script/cli/doc.lua +++ b/script/cli/doc.lua @@ -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 @@ -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 -- cgit v1.2.3