| author | |
| committer | |
| log | c5afefec427f2f2aeb25fe8f7114b5a0a6aa1129 |
| tree | ae13c0e92e01d36689859e416360aa72f06fd329 |
| parent | 622714b76b6c3a21a5806e894151d6de8a7e6866 |
We were previously erroneously saving it as a `@TypeOf`.2 files changed, 7 insertions(+), 1 deletions(-)
lib/docs/main.js+5| ... | ... | @@ -1403,6 +1403,11 @@ var zigAnalysis; |
| 1403 | 1403 | let payloadHtml = "@TypeOf(" + exprName(typeRefArg, {wantHtml: true, wantLink:true}) + ")"; |
| 1404 | 1404 | return payloadHtml; |
| 1405 | 1405 | } |
| 1406 | case "typeInfo": { | |
| 1407 | const typeRefArg = zigAnalysis.exprs[expr.typeInfo]; | |
| 1408 | let payloadHtml = "@typeInfo(" + exprName(typeRefArg, {wantHtml: true, wantLink:true}) + ")"; | |
| 1409 | return payloadHtml; | |
| 1410 | } | |
| 1406 | 1411 | case "null": { |
| 1407 | 1412 | return "null"; |
| 1408 | 1413 | } |
src/Autodoc.zig+2-1| ... | ... | @@ -580,6 +580,7 @@ const DocData = struct { |
| 580 | 580 | enumLiteral: []const u8, // direct value |
| 581 | 581 | alignOf: usize, // index in `exprs` |
| 582 | 582 | typeOf: usize, // index in `exprs` |
| 583 | typeInfo: usize, // index in `exprs` | |
| 583 | 584 | typeOf_peer: []usize, |
| 584 | 585 | errorUnion: usize, // index in `exprs` |
| 585 | 586 | as: As, |
| ... | ... | @@ -1788,7 +1789,7 @@ fn walkInstruction( |
| 1788 | 1789 | |
| 1789 | 1790 | return DocData.WalkResult{ |
| 1790 | 1791 | .typeRef = operand.typeRef, |
| 1791 | .expr = .{ .typeOf = operand_index }, | |
| 1792 | .expr = .{ .typeInfo = operand_index }, | |
| 1792 | 1793 | }; |
| 1793 | 1794 | }, |
| 1794 | 1795 | .as_node => { |