| author | |
| committer | |
| log | e1dbb70bef002f049621a286dbb6a1b2e067af81 |
| tree | 0bc63a48496ddd255cc64e37998b066e1e30d5a3 |
| parent | 2f635c3ce9be74f9e9ffb71324f7ba51bd2987f4 |
| parent | 259f407160f84a1bf33c1aa7bd10318213f52ddf |
3 files changed, 8 insertions(+), 8 deletions(-)
lib/docs/main.js+3-3| ... | ... | @@ -2215,6 +2215,7 @@ var zigAnalysis; |
| 2215 | 2215 | } |
| 2216 | 2216 | |
| 2217 | 2217 | if (typesList.length !== 0) { |
| 2218 | window.x = typesList; | |
| 2218 | 2219 | resizeDomList(domListTypes, typesList.length, '<li><a href="#"></a></li>'); |
| 2219 | 2220 | for (let i = 0; i < typesList.length; i += 1) { |
| 2220 | 2221 | let liDom = domListTypes.children[i]; |
| ... | ... | @@ -2252,7 +2253,6 @@ var zigAnalysis; |
| 2252 | 2253 | if (fnsList.length !== 0) { |
| 2253 | 2254 | resizeDomList(domListFns, fnsList.length, '<div><dt></dt><dd></dd></div>'); |
| 2254 | 2255 | |
| 2255 | window.x = domListFns; | |
| 2256 | 2256 | for (let i = 0; i < fnsList.length; i += 1) { |
| 2257 | 2257 | let decl = fnsList[i]; |
| 2258 | 2258 | let trDom = domListFns.children[i]; |
| ... | ... | @@ -2594,7 +2594,7 @@ var zigAnalysis; |
| 2594 | 2594 | if (list[mainDeclIndex] != null) continue; |
| 2595 | 2595 | |
| 2596 | 2596 | let decl = zigAnalysis.decls[mainDeclIndex]; |
| 2597 | let declVal = decl.value; //resolveValue(decl.value); | |
| 2597 | let declVal = resolveValue(decl.value); | |
| 2598 | 2598 | let declNames = item.declNames.concat([decl.name]); |
| 2599 | 2599 | list[mainDeclIndex] = { |
| 2600 | 2600 | pkgNames: pkgNames, |
| ... | ... | @@ -2615,7 +2615,7 @@ var zigAnalysis; |
| 2615 | 2615 | } |
| 2616 | 2616 | |
| 2617 | 2617 | |
| 2618 | // Generic function | |
| 2618 | // Generic fun/ction | |
| 2619 | 2619 | if (value.kind == typeKinds.Fn && value.generic_ret != null) { |
| 2620 | 2620 | let resolvedVal = resolveValue({ expr: value.generic_ret}); |
| 2621 | 2621 | if ("type" in resolvedVal.expr) { |
src/Autodoc.zig+3-4| ... | ... | @@ -3497,10 +3497,9 @@ fn analyzeFunction( |
| 3497 | 3497 | }, |
| 3498 | 3498 | }, |
| 3499 | 3499 | else => blk: { |
| 3500 | //const last_instr_index = fn_info.ret_ty_body[fn_info.ret_ty_body.len - 1]; | |
| 3501 | //const break_operand = data[last_instr_index].@"break".operand; | |
| 3502 | //const wr = try self.walkRef(file, scope, break_operand, false); | |
| 3503 | const wr = try self.walkRef(file, scope, fn_info.ret_ty_ref, false); | |
| 3500 | const last_instr_index = fn_info.ret_ty_body[fn_info.ret_ty_body.len - 1]; | |
| 3501 | const break_operand = data[last_instr_index].@"break".operand; | |
| 3502 | const wr = try self.walkRef(file, scope, break_operand, false); | |
| 3504 | 3503 | break :blk wr.expr; |
| 3505 | 3504 | }, |
| 3506 | 3505 | }; |
test/cli.zig+2-1| ... | ... | @@ -104,7 +104,8 @@ fn testZigInitLib(zig_exe: []const u8, dir_path: []const u8) !void { |
| 104 | 104 | fn testZigInitExe(zig_exe: []const u8, dir_path: []const u8) !void { |
| 105 | 105 | _ = try exec(dir_path, true, &[_][]const u8{ zig_exe, "init-exe" }); |
| 106 | 106 | const run_result = try exec(dir_path, true, &[_][]const u8{ zig_exe, "build", "run" }); |
| 107 | try testing.expectEqualStrings("info: All your codebase are belong to us.\n", run_result.stderr); | |
| 107 | try testing.expectEqualStrings("All your codebase are belong to us.\n", run_result.stderr); | |
| 108 | try testing.expectEqualStrings("Run `zig build test` to run the tests.\n", run_result.stdout); | |
| 108 | 109 | } |
| 109 | 110 | |
| 110 | 111 | fn testGodboltApi(zig_exe: []const u8, dir_path: []const u8) anyerror!void { |