fix: "match failure" in c.zig file @check other files and handling floats and undefined values in js

This commit is contained in:
Vallahor 2022-05-29 05:22:41 -03:00 committed by Andrew Kelley
parent 462f751902
commit d23ccdb8d9
2 changed files with 9 additions and 1 deletions

View File

@ -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) + "\"";
}

View File

@ -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;
},
},