autodoc: don't collect tests, usingnamespace and comptime blocks

Previously we were collecting as autodoc decls everything that was a ZIR
decl in a rather naive way. Now we only collect decltests as part of the
data relative to the decl they refer to, and ignore everything else.
This commit is contained in:
Loris Cro
2022-09-18 20:00:44 +02:00
parent 54854e2ab8
commit 2698cb346a
2 changed files with 90 additions and 69 deletions
+7 -8
View File
@@ -2271,10 +2271,10 @@ var zigAnalysis;
let decl = getDecl(decls[i]);
let declValue = resolveValue(decl.value);
if (decl.isTest) {
testsList.push(decl);
continue;
}
// if (decl.isTest) {
// testsList.push(decl);
// continue;
// }
if (decl.kind === "var") {
varsList.push(decl);
@@ -3522,10 +3522,9 @@ var zigAnalysis;
return {
name: decl[0],
kind: decl[1],
isTest: decl[2],
src: decl[3],
value: decl[4],
decltest: decl[5],
src: decl[2],
value: decl[3],
decltest: decl[4],
};
}