diff options
| author | Loris Cro <kappaloris@gmail.com> | 2022-10-30 17:16:24 +0100 |
|---|---|---|
| committer | Loris Cro <kappaloris@gmail.com> | 2022-10-30 17:17:34 +0100 |
| commit | d4487b6a2e790ee3f479f451a4c0ee0eb39d159e (patch) | |
| tree | e0fa641bf5231861b67cc13812019e618c82e7f2 /src | |
| parent | 2b25d3c33394edcf8760ed49495c162aac80f59b (diff) | |
| download | zig-d4487b6a2e790ee3f479f451a4c0ee0eb39d159e.tar.gz zig-d4487b6a2e790ee3f479f451a4c0ee0eb39d159e.zip | |
autodoc: update to new func zir body structure
this is a hack meant to restore functionality for the upcoming release,
a proper analysis of the new zir structure is required to make a robust
change.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Autodoc.zig | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Autodoc.zig b/src/Autodoc.zig index d2f052b701..04b13c3026 100644 --- a/src/Autodoc.zig +++ b/src/Autodoc.zig @@ -950,6 +950,12 @@ fn walkInstruction( need_type, ); }, + .ret_type => { + return DocData.WalkResult{ + .typeRef = .{ .type = @enumToInt(Ref.type_type) }, + .expr = .{ .type = @enumToInt(Ref.type_type) }, + }; + }, .ret_node => { const un_node = data[inst_index].un_node; return self.walkRef(file, parent_scope, parent_src, un_node.operand, false); @@ -3987,7 +3993,7 @@ fn getGenericReturnType( body_end: usize, ) !DocData.Expr { // TODO: compute the correct line offset - const wr = try self.walkInstruction(file, scope, parent_src, body_end, false); + const wr = try self.walkInstruction(file, scope, parent_src, body_end - 3, false); return wr.expr; } |
