authorgravatar for der.teufel.mail@gmail.comKrzysztof Wolicki <der.teufel.mail@gmail.com> 2023-01-29 14:42:18+01:00
committergravatar for der.teufel.mail@gmail.comKrzysztof Wolicki <der.teufel.mail@gmail.com> 2023-01-29 14:42:18+01:00
log76fcb95bdf5509f6b02ca8c68af2b8f630a6cfe0
tree71a3389e67bc5c805492781068ca37284044c21b
parentf68d3c63df0486c7039732ef442c87fcd7c6fc57

autodoc: Implemented struct_init_empty for walkInstruction, fixed variable type with has_init but no type before =


1 files changed, 5 insertions(+), 11 deletions(-)

src/Autodoc.zig+5-11
......@@ -2200,17 +2200,10 @@ fn walkInstruction(
22002200 false,
22012201 );
22022202
2203 _ = operand;
2204
2205 // WIP
2206
2207 printWithContext(
2208 file,
2209 inst_index,
2210 "TODO: implement `{s}` for walkInstruction\n\n",
2211 .{@tagName(tags[inst_index])},
2212 );
2213 return self.cteTodo(@tagName(tags[inst_index]));
2203 return DocData.WalkResult{
2204 .typeRef = operand.expr,
2205 .expr = .{ .@"struct" = &.{} },
2206 };
22142207 },
22152208 .struct_init_anon => {
22162209 const pl_node = data[inst_index].pl_node;
......@@ -2537,6 +2530,7 @@ fn walkInstruction(
25372530 const var_init_ref = @intToEnum(Ref, file.zir.extra[extra_index]);
25382531 const var_init = try self.walkRef(file, parent_scope, parent_src, var_init_ref, need_type);
25392532 value.expr = var_init.expr;
2533 value.typeRef = var_init.typeRef;
25402534 }
25412535
25422536 return value;