mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-27 19:09:47 +03:00
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:
+7
-8
@@ -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],
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user