summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins
diff options
context:
space:
mode:
Diffstat (limited to 'MCServer/Plugins')
-rw-r--r--MCServer/Plugins/APIDump/main.lua30
1 files changed, 16 insertions, 14 deletions
diff --git a/MCServer/Plugins/APIDump/main.lua b/MCServer/Plugins/APIDump/main.lua
index 7a7cc84c2..212cd54ed 100644
--- a/MCServer/Plugins/APIDump/main.lua
+++ b/MCServer/Plugins/APIDump/main.lua
@@ -222,7 +222,6 @@ function DumpAPIHtml()
f:write("\n-- This is the list of undocumented API objects, automatically generated by APIDump\n\n");
f:write("g_APIDesc =\n{\n\tClasses =\n\t{\n");
for i, cls in ipairs(API) do
- local HasWrittenClassHeader = false;
local HasFunctions = ((cls.UndocumentedFunctions ~= nil) and (#cls.UndocumentedFunctions > 0));
local HasConstants = ((cls.UndocumentedConstants ~= nil) and (#cls.UndocumentedConstants > 0));
if (HasFunctions or HasConstants) then
@@ -318,8 +317,6 @@ function ReadDescriptions(a_API)
return false;
end
- local UnexportedDocumented = {}; -- List of API objects that are documented but not exported, simply a list of names
-
for i, cls in ipairs(a_API) do
-- Rename special functions:
for j, fn in ipairs(cls.Functions) do
@@ -394,11 +391,6 @@ function ReadDescriptions(a_API)
-- Replace functions with their described and overload-expanded versions:
cls.Functions = DoxyFunctions;
-
- -- Add all non-exported function descriptions to UnexportedDocumented:
- for j, func in pairs(APIDesc.Functions) do
- -- TODO
- end
end -- if (APIDesc.Functions ~= nil)
if (APIDesc.Constants ~= nil) then
@@ -415,13 +407,23 @@ function ReadDescriptions(a_API)
CnDesc.IsExported = true;
end
end -- for j, cons
-
- -- Add all non-exported constant descriptions to UnexportedDocumented:
- for j, cons in pairs(APIDesc.Constants) do
- -- TODO
- end
end -- if (APIDesc.Constants ~= nil)
- end -- if (APIDesc ~= nil)
+ else
+ -- Class is not documented at all, add all its members to Undocumented lists:
+ cls.UndocumentedFunctions = {};
+ cls.UndocumentedConstants = {};
+ for j, func in ipairs(cls.Functions) do
+ local FnName = func.DocID or func.Name;
+ if not(IsFunctionIgnored(cls.Name .. "." .. FnName)) then
+ table.insert(cls.UndocumentedFunctions, FnName);
+ end
+ end -- for j, func - cls.Functions[]
+ for j, cons in ipairs(cls.Constants) do
+ if not(IsConstantIgnored(cls.Name .. "." .. cons.Name)) then
+ table.insert(cls.UndocumentedConstants, cons.Name);
+ end
+ end -- for j, cons - cls.Constants[]
+ end -- else if (APIDesc ~= nil)
-- Remove ignored functions:
local NewFunctions = {};