diff options
| author | Loris Cro <kappaloris@gmail.com> | 2023-03-31 17:26:55 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-31 17:26:55 +0200 |
| commit | ab2c602f3493d76e1ad6872cb578115b45b7c6fe (patch) | |
| tree | 7249d0c87f7862fcc9896af0d1897bad39da46a1 /src | |
| parent | 23cf44c227678bde07b872e2a5ff1089c028c582 (diff) | |
| parent | 27d2848e0096d31cb42cb258a89ed276ec26434e (diff) | |
| download | zig-ab2c602f3493d76e1ad6872cb578115b45b7c6fe.tar.gz zig-ab2c602f3493d76e1ad6872cb578115b45b7c6fe.zip | |
Merge pull request #14823 from der-teufel-programming/autodoc-quickfixes
autodoc: Add struct to tryResolveRefPath
Diffstat (limited to 'src')
| -rw-r--r-- | src/Autodoc.zig | 19 |
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; + }, } } |
