authorgravatar for der.teufel.mail@gmail.comKrzysztof Wolicki <der.teufel.mail@gmail.com> 2023-09-07 14:48:23+02:00
committergravatar for kappaloris@gmail.comLoris Cro <kappaloris@gmail.com> 2023-09-16 17:30:49+02:00
logda28379d6cc7322eefb65b8ec93995e212e42e6e
treef4b9ca888bf90fb1d49aab56c28a737d60216929
parent8a9aa9e112bd75b057eff4b6449a5af86ed568a4

autodoc: Remove unnecessary Expr tag


2 files changed, 2 insertions(+), 8 deletions(-)

lib/docs/main.js+1-6
......@@ -1348,6 +1348,7 @@ Happy writing!
13481348 yield { src: "false", tag: Tag.identifier };
13491349 return;
13501350 }
1351
13511352 case "&": {
13521353 yield { src: "&", tag: Tag.ampersand };
13531354 yield* ex(zigAnalysis.exprs[expr["&"]], opts);
......@@ -1361,12 +1362,6 @@ Happy writing!
13611362 return;
13621363 }
13631364
1364 case "ref": {
1365 yield { src: "&", tag: Tag.ampersand };
1366 yield* ex(zigAnalysis.exprs[expr.ref], opts);
1367 return;
1368 }
1369
13701365 case "call": {
13711366
13721367 let call = zigAnalysis.calls[expr.call];
src/Autodoc.zig+1-2
......@@ -797,7 +797,6 @@ const DocData = struct {
797797 binOp: BinOp,
798798 binOpIndex: usize,
799799 load: usize, // index in `exprs`
800 ref: usize, // index in `exprs`
801800 const BinOp = struct {
802801 lhs: usize, // index in `exprs`
803802 rhs: usize, // index in `exprs`
......@@ -1536,7 +1535,7 @@ fn walkInstruction(
15361535 try self.exprs.append(self.arena, operand.expr);
15371536
15381537 return DocData.WalkResult{
1539 .expr = .{ .ref = ref_idx },
1538 .expr = .{ .@"&" = ref_idx },
15401539 };
15411540 },
15421541