const char = input[pos];
if (char === '"' || char === `'`) {
const quote = char;
pos++; // Skip opening quote
while (pos < input.length && input[pos] !== quote) {
value += input[pos];
pos++;
}
endPos = pos + 1; // Include closing quote in the range
if (pos < input.length) {
pos++;
}
quoteStyle = quote === '"' ? 'double' : 'single';
} else {
// Unquoted string - read until comma or end