authorgravatar for kappaloris@gmail.comLoris Cro <kappaloris@gmail.com> 2024-02-14 15:35:00+01:00
committergravatar for kappaloris@gmail.comLoris Cro <kappaloris@gmail.com> 2024-02-14 15:35:00+01:00
loga23ab331a28d865e3ea636c9033db4de345f8653
tree45a16b8608cb7b1e14653931b6235095a2c4448e
parent3f5593205dd687e9c637d7c34bd05b3ba53c2312

autodoc: fix analysis of closure_get instructions


1 files changed, 9 insertions(+), 8 deletions(-)

src/Autodoc.zig+9-8
......@@ -1153,14 +1153,15 @@ fn walkInstruction(
11531153 },
11541154 .closure_get => {
11551155 const inst_node = data[@intFromEnum(inst)].inst_node;
1156 return try self.walkInstruction(
1157 file,
1158 parent_scope,
1159 parent_src,
1160 inst_node.inst,
1161 need_type,
1162 call_ctx,
1163 );
1156
1157 const code = try self.getBlockSource(file, parent_src, inst_node.src_node);
1158 const idx = self.comptime_exprs.items.len;
1159 try self.exprs.append(self.arena, .{ .comptimeExpr = idx });
1160 try self.comptime_exprs.append(self.arena, .{ .code = code });
1161
1162 return DocData.WalkResult{
1163 .expr = .{ .comptimeExpr = idx },
1164 };
11641165 },
11651166 .closure_capture => {
11661167 const un_tok = data[@intFromEnum(inst)].un_tok;