Function peekNextTokenType [src]

See std.json.Scanner.peekNextTokenType().

Prototype

pub fn peekNextTokenType(self: *@This()) Reader.PeekError!TokenType

Parameters

self: *@This()

Possible Errors

EndOfStream Error
ReadFailed Error

See the Reader implementation for detailed diagnostics.

SyntaxError Error
UnexpectedEndOfInput Error

Source

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