pub fn feedInput(self: *@This(), input: []const u8) void self: *@This()input: []const u895
96
97
98
99
100
101
102
103
104
105
106pub fn feedInput(self: *@This(), input: []const u8) void {
assert(self.cursor == self.input.len); // Not done with the last input slice.
if (self.diagnostics) |diag| {
diag.total_bytes_before_current_input += self.input.len;
// This usually goes "negative" to measure how far before the beginning
// of the new buffer the current line started.
diag.line_start_cursor -%= self.cursor;
}
self.input = input;
self.cursor = 0;
self.value_start = 0;
}
Call this whenever you get
error.BufferUnderrunfromnext(). When there is no more input to provide, callendInput().