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!...@@ -1348,6 +1348,7 @@ Happy writing!
1348 yield { src: "false", tag: Tag.identifier };1348 yield { src: "false", tag: Tag.identifier };
1349 return;1349 return;
1350 }1350 }
1351
1351 case "&": {1352 case "&": {
1352 yield { src: "&", tag: Tag.ampersand };1353 yield { src: "&", tag: Tag.ampersand };
1353 yield* ex(zigAnalysis.exprs[expr["&"]], opts);1354 yield* ex(zigAnalysis.exprs[expr["&"]], opts);
...@@ -1361,12 +1362,6 @@ Happy writing!...@@ -1361,12 +1362,6 @@ Happy writing!
1361 return;1362 return;
1362 }1363 }
13631364
1364 case "ref": {
1365 yield { src: "&", tag: Tag.ampersand };
1366 yield* ex(zigAnalysis.exprs[expr.ref], opts);
1367 return;
1368 }
1369
1370 case "call": {1365 case "call": {
13711366
1372 let call = zigAnalysis.calls[expr.call];1367 let call = zigAnalysis.calls[expr.call];
src/Autodoc.zig+1-2
...@@ -797,7 +797,6 @@ const DocData = struct {...@@ -797,7 +797,6 @@ const DocData = struct {
797 binOp: BinOp,797 binOp: BinOp,
798 binOpIndex: usize,798 binOpIndex: usize,
799 load: usize, // index in `exprs`799 load: usize, // index in `exprs`
800 ref: usize, // index in `exprs`
801 const BinOp = struct {800 const BinOp = struct {
802 lhs: usize, // index in `exprs`801 lhs: usize, // index in `exprs`
803 rhs: usize, // index in `exprs`802 rhs: usize, // index in `exprs`
...@@ -1536,7 +1535,7 @@ fn walkInstruction(...@@ -1536,7 +1535,7 @@ fn walkInstruction(
1536 try self.exprs.append(self.arena, operand.expr);1535 try self.exprs.append(self.arena, operand.expr);
15371536
1538 return DocData.WalkResult{1537 return DocData.WalkResult{
1539 .expr = .{ .ref = ref_idx },1538 .expr = .{ .@"&" = ref_idx },
1540 };1539 };
1541 },1540 },
15421541