Function skipUntilStackHeight [src]

Like std.json.Scanner.skipUntilStackHeight() but handles error.BufferUnderrun.

Prototype

pub fn skipUntilStackHeight(self: *@This(), terminal_stack_height: usize) Reader.NextError!void

Parameters

self: *@This()terminal_stack_height: usize

Possible Errors

EndOfStream Error
OutOfMemory Error
ReadFailed Error

See the Reader implementation for detailed diagnostics.

SyntaxError Error
UnexpectedEndOfInput Error

Source

pub fn skipUntilStackHeight(self: *@This(), terminal_stack_height: usize) Reader.NextError!void { while (true) { return self.scanner.skipUntilStackHeight(terminal_stack_height) catch |err| switch (err) { error.BufferUnderrun => { try self.refillBuffer(); continue; }, else => |other_err| return other_err, }; } }