Lines Matching refs:idx
143 local function next_char(str, idx, set, negate)
144 for i = idx, #str do
153 local function decode_error(str, idx, msg)
156 for i = 1, idx - 1 do
343 parse = function(str, idx)
344 local chr = str:sub(idx, idx)
347 return f(str, idx)
349 decode_error(str, idx, "unexpected character '" .. chr .. "'")
357 local res, idx = parse(str, next_char(str, 1, space_chars, true))
358 idx = next_char(str, idx, space_chars, true)
359 if idx <= #str then
360 decode_error(str, idx, "trailing garbage")