Zig 0.17.0-dev (Split by item)

This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.

skipWhitespaceCheckEnd

Scanner.skipWhitespaceCheckEnd
fn skipWhitespaceCheckEnd(self: *@This()) !bool

File

lib/std/json/Scanner.zig:1303

Code

fn skipWhitespaceCheckEnd(self: *@This()) !bool {
    self.skipWhitespace();
    if (self.cursor >= self.input.len) {
        // End of buffer.
        if (self.is_end_of_input) {
            // End of everything.
            if (self.stackHeight() == 0) {
                // We did it!
                return true;
            }
            return error.UnexpectedEndOfInput;
        }
        return error.BufferUnderrun;
    }
    if (self.stackHeight() == 0) return error.SyntaxError;
    return false;
}