Compare commits

...

3 commits

Author SHA1 Message Date
f149909075
remove parse() function
All checks were successful
Generic zig build / build (push) Successful in 20s
2026-05-29 11:17:04 -07:00
b1e784dbb2
provide allocator control and lieniency on to 2026-05-28 18:13:02 -07:00
d89a3b2a93
support for lienient number parsing (minus locale issues) 2026-05-28 16:45:36 -07:00
2 changed files with 634 additions and 762 deletions

View file

@ -74,8 +74,13 @@ pub fn main(init: std.process.Init) !void {
if (std.mem.eql(u8, format, "srf")) {
var reader = std.Io.Reader.fixed(data.items);
const records = try srf.parse(&reader, allocator, .{ .parse_allocator = .none });
defer records.deinit();
const it = try srf.iterator(&reader, allocator, .{ .parse_allocator = .none });
defer it.deinit();
// We want to touch every field, otherwise we're not really excercising
// this appropriately
while (try it.next()) |rec| {
while (try rec.next()) |_| {}
}
} else if (std.mem.eql(u8, format, "jsonl")) {
var lines = std.mem.splitScalar(u8, data.items, '\n');
while (lines.next()) |line| {

File diff suppressed because it is too large Load diff