Remove undocumented symbols at the end of the parsing process
This ensures that we do not mark symbols as undocumented before all potential dependencies are parsed.
This commit is contained in:
+23
-25
@@ -101,36 +101,34 @@ exports.handlers = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
|
||||||
};
|
parseComplete: function(e) {
|
||||||
|
for (var j = e.doclets.length - 1; j >= 0; --j) {
|
||||||
|
var doclet = e.doclets[j];
|
||||||
function filter(e) {
|
if (doclet.kind == 'namespace') {
|
||||||
if (e.doclet) {
|
continue;
|
||||||
var fqn = e.doclet.longname;
|
}
|
||||||
if (fqn) {
|
var fqn = doclet.longname;
|
||||||
e.doclet.undocumented = (api.indexOf(fqn) === -1 && unexported.indexOf(fqn) === -1);
|
if (fqn) {
|
||||||
e.doclet.unexported = (unexported.indexOf(fqn) !== -1);
|
var undocumented = (api.indexOf(fqn) === -1 && unexported.indexOf(fqn) === -1);
|
||||||
// Remove parents that are not part of the API
|
doclet.unexported = (unexported.indexOf(fqn) !== -1);
|
||||||
var parent;
|
// Remove parents that are not part of the API
|
||||||
var parents = e.doclet.augments;
|
var parent;
|
||||||
if (parents) {
|
var parents = doclet.augments;
|
||||||
for (var i = parents.length - 1; i >= 0; --i) {
|
if (parents) {
|
||||||
parent = parents[i];
|
for (var i = parents.length - 1; i >= 0; --i) {
|
||||||
if (api.indexOf(parent) === -1) {
|
parent = parents[i];
|
||||||
parents.splice(i, 1);
|
if (api.indexOf(parent) === -1 && unexported.indexOf(parent) === -1) {
|
||||||
|
parents.splice(i, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (undocumented) {
|
||||||
|
e.doclets.splice(j, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
exports.nodeVisitor = {
|
|
||||||
|
|
||||||
visitNode: function(node, e, parser, currentSourceName) {
|
|
||||||
// filter out non-API symbols before the addDocletRef finisher is called
|
|
||||||
e.finishers.unshift(filter);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user