feat: String_ToFloat + Json escape sequence support

- Add bux_str_to_float() C runtime wrapper (strtod)
- Add String_ToFloat() in library/std/String.bux
- Update JsonParser_ParseNumber to use String_ToFloat (decimals now work)
- Update JsonParser_ParseString to decode escape sequences (\n, \t, \r, \", \\, \b, \f)
- Fix use-after-free in JsonParser_ParseString: String_Copy before StringBuilder_Free
This commit is contained in:
2026-06-05 22:35:50 +03:00
parent d0de9c2abf
commit 154579b30d
4 changed files with 36 additions and 6 deletions
+6
View File
@@ -179,6 +179,12 @@ func String_Replace(s: String, old: String, new: String) -> String {
return result;
}
extern func bux_str_to_float(s: String) -> float64;
func String_ToFloat(s: String) -> float64 {
return bux_str_to_float(s);
}
func String_FromFloat(f: float64) -> String {
return bux_float_to_string(f);
}