From d23ccdb8d9e4d3510667164545f9c3be3374d529 Mon Sep 17 00:00:00 2001 From: Vallahor Date: Sun, 29 May 2022 05:22:41 -0300 Subject: [PATCH] fix: "match failure" in c.zig file @check other files and handling floats and undefined values in js --- lib/docs/main.js | 6 ++++++ src/Autodoc.zig | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/docs/main.js b/lib/docs/main.js index 1d8305c9dc..50e5a5865b 100644 --- a/lib/docs/main.js +++ b/lib/docs/main.js @@ -1259,6 +1259,12 @@ var zigAnalysis; case "int": { return "" + expr.int; } + case "float": { + return "" + expr.float.toFixed(2); + } + case "undefined": { + return "undefined"; + } case "string": { return "\"" + escapeHtml(expr.string) + "\""; } diff --git a/src/Autodoc.zig b/src/Autodoc.zig index 9077c80179..e07c2a9b29 100644 --- a/src/Autodoc.zig +++ b/src/Autodoc.zig @@ -3423,7 +3423,9 @@ fn tryResolveRefPath( "failed to match `{s}` in struct", .{child_string}, ); - path[i + 1] = (try self.cteTodo("match failure")).expr; + // path[i + 1] = (try self.cteTodo("match failure")).expr; + // this are working, check c.zig + path[i + 1] = (try self.cteTodo(child_string)).expr; continue :outer; }, },