| ... | ... | @@ -26,6 +26,11 @@ pub fn parse(alloc: std.mem.Allocator, path: string, inreader: anytype, options: |
| 26 | 26 | }; |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | pub fn parseFromSlice(alloc: std.mem.Allocator, path: string, input: string, options: Parser.Options) !Document { |
| 30 | var fbs = std.io.fixedBufferStream(input); |
| 31 | return parse(alloc, path, fbs.reader(), options); |
| 32 | } |
| 33 | |
| 29 | 34 | fn parseElementPrecise(alloc: std.mem.Allocator, p: *Parser, comptime E: type) E!ValueIndex { |
| 30 | 35 | return @errorCast(parseElement(alloc, p)); |
| 31 | 36 | } |