minor cleanup

This commit is contained in:
2025-05-22 11:34:29 +03:00
parent 45292990b1
commit 6e9250ffd1
6 changed files with 112 additions and 23 deletions

View File

@@ -102,16 +102,17 @@ local function parse_impl(str, pos, end_delim)
local delim_found;
if c == "{" then
pos = pos + 1;
pos = str:find("%S", pos + 1) or pos;
local key;
local obj = {};
c = string.sub(str, pos, pos);
if c == "}" then
return obj, pos
return obj, pos;
else
while true do
pos = skip_delim(str, pos);
key, pos = parse_str_val(str, pos, true);
if key == nil then error("Expected a string key") end