mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-09 23:29:03 +00:00
autodoc: fix analysis of closure_get instructions
This commit is contained in:
parent
3f5593205d
commit
a23ab331a2
1 changed files with 9 additions and 8 deletions
|
|
@ -1153,14 +1153,15 @@ fn walkInstruction(
|
||||||
},
|
},
|
||||||
.closure_get => {
|
.closure_get => {
|
||||||
const inst_node = data[@intFromEnum(inst)].inst_node;
|
const inst_node = data[@intFromEnum(inst)].inst_node;
|
||||||
return try self.walkInstruction(
|
|
||||||
file,
|
const code = try self.getBlockSource(file, parent_src, inst_node.src_node);
|
||||||
parent_scope,
|
const idx = self.comptime_exprs.items.len;
|
||||||
parent_src,
|
try self.exprs.append(self.arena, .{ .comptimeExpr = idx });
|
||||||
inst_node.inst,
|
try self.comptime_exprs.append(self.arena, .{ .code = code });
|
||||||
need_type,
|
|
||||||
call_ctx,
|
return DocData.WalkResult{
|
||||||
);
|
.expr = .{ .comptimeExpr = idx },
|
||||||
|
};
|
||||||
},
|
},
|
||||||
.closure_capture => {
|
.closure_capture => {
|
||||||
const un_tok = data[@intFromEnum(inst)].un_tok;
|
const un_tok = data[@intFromEnum(inst)].un_tok;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue