aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Autodoc.zig19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/Autodoc.zig b/src/Autodoc.zig
index 15d90b104b..47b0c8d3c2 100644
--- a/src/Autodoc.zig
+++ b/src/Autodoc.zig
@@ -3616,6 +3616,25 @@ fn tryResolveRefPath(
continue :outer;
},
},
+ .@"struct" => |st| {
+ for (st) |field| {
+ if (std.mem.eql(u8, field.name, child_string)) {
+ path[i + 1] = field.val.expr;
+ continue :outer;
+ }
+ }
+
+ // if we got here, our search failed
+ printWithContext(
+ file,
+ inst_index,
+ "failed to match `{s}` in struct",
+ .{child_string},
+ );
+
+ path[i + 1] = (try self.cteTodo("match failure")).expr;
+ continue :outer;
+ },
}
}