| ... | @@ -1,9 +1,10 @@ | ... | @@ -1,9 +1,10 @@ |
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | const string = []const u8; | 2 | const string = []const u8; |
| 3 | const extras = @import("extras"); | 3 | const extras = @import("extras"); |
| | 4 | const nio = @import("nio"); |
| 4 | | 5 | |
| 5 | pub const Parser = struct { | 6 | pub const Parser = struct { |
| 6 | any: std.io.AnyReader, | 7 | any: nio.AnyReadable, |
| 7 | allocator: std.mem.Allocator, | 8 | allocator: std.mem.Allocator, |
| 8 | temp: std.ArrayListUnmanaged(u8) = .{}, | 9 | temp: std.ArrayListUnmanaged(u8) = .{}, |
| 9 | idx: usize = 0, | 10 | idx: usize = 0, |
| ... | @@ -14,7 +15,7 @@ pub const Parser = struct { | ... | @@ -14,7 +15,7 @@ pub const Parser = struct { |
| 14 | strings_map: std.StringArrayHashMapUnmanaged(usize) = .{}, | 15 | strings_map: std.StringArrayHashMapUnmanaged(usize) = .{}, |
| 15 | string_tag: u8, | 16 | string_tag: u8, |
| 16 | | 17 | |
| 17 | pub fn init(allocator: std.mem.Allocator, any: std.io.AnyReader, string_tag: u8) Parser { | 18 | pub fn init(allocator: std.mem.Allocator, any: nio.AnyReadable, string_tag: u8) Parser { |
| 18 | return .{ | 19 | return .{ |
| 19 | .any = any, | 20 | .any = any, |
| 20 | .allocator = allocator, | 21 | .allocator = allocator, |