mirror of
https://github.com/ziglang/zig.git
synced 2025-12-29 17:43:17 +00:00
Merge pull request #14489 from der-teufel-programming/autodoc-initempty
autodoc: Implemented struct_init_empty for walkInstruction
This commit is contained in:
commit
93c56a70c4
@ -2200,17 +2200,10 @@ fn walkInstruction(
|
||||
false,
|
||||
);
|
||||
|
||||
_ = operand;
|
||||
|
||||
// WIP
|
||||
|
||||
printWithContext(
|
||||
file,
|
||||
inst_index,
|
||||
"TODO: implement `{s}` for walkInstruction\n\n",
|
||||
.{@tagName(tags[inst_index])},
|
||||
);
|
||||
return self.cteTodo(@tagName(tags[inst_index]));
|
||||
return DocData.WalkResult{
|
||||
.typeRef = operand.expr,
|
||||
.expr = .{ .@"struct" = &.{} },
|
||||
};
|
||||
},
|
||||
.struct_init_anon => {
|
||||
const pl_node = data[inst_index].pl_node;
|
||||
@ -2537,6 +2530,7 @@ fn walkInstruction(
|
||||
const var_init_ref = @intToEnum(Ref, file.zir.extra[extra_index]);
|
||||
const var_init = try self.walkRef(file, parent_scope, parent_src, var_init_ref, need_type);
|
||||
value.expr = var_init.expr;
|
||||
value.typeRef = var_init.typeRef;
|
||||
}
|
||||
|
||||
return value;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user