autodoc: implement typeof support in new rendering system
This commit is contained in:
@@ -1203,6 +1203,20 @@ Happy writing!
|
||||
yield Tok.r_paren;
|
||||
return;
|
||||
}
|
||||
case "typeOf_peer": {
|
||||
yield { src: "@TypeOf", tag: Tag.builtin };
|
||||
yield { src: "(", tag: Tag.l_paren };
|
||||
for (let i = 0; i < expr.typeOf_peer.length; i+=1) {
|
||||
const elem = zigAnalysis.exprs[expr.typeOf_peer[i]];
|
||||
yield* ex(elem, opts);
|
||||
if (i != expr.typeOf_peer.length - 1) {
|
||||
yield Tok.comma;
|
||||
yield Tok.space;
|
||||
}
|
||||
}
|
||||
yield { src: ")", tag: Tag.r_paren };
|
||||
return;
|
||||
}
|
||||
case "sizeOf": {
|
||||
const sizeOf = zigAnalysis.exprs[expr.sizeOf];
|
||||
yield { src: "@sizeOf", tag: Tag.builtin };
|
||||
|
||||
Reference in New Issue
Block a user