little speedup (hopefully)
This commit is contained in:
parent
9b440f279e
commit
bab8c2b629
@ -84,7 +84,7 @@ end
|
||||
|
||||
local function parse_flat_table(str)
|
||||
if str:find("{%s*}") then return true, {} end
|
||||
str = str:gsub("^{(.-)[,;]?%s*}$", "%1,")
|
||||
str = str:match("^{(.-)[,;]?%s*}$") .. ","
|
||||
local next_index = 1
|
||||
|
||||
local res = {}
|
||||
@ -92,7 +92,7 @@ local function parse_flat_table(str)
|
||||
local key, value, success
|
||||
if pair:find("=") then
|
||||
key, value = pair:match("^(.-)=(.*)$")
|
||||
key = key:gsub("^%s*(.-)%s*$", "%1")
|
||||
key = key:match("^%s*(.-)%s*$")
|
||||
success, key = parse_key(key)
|
||||
if not success then return false, key end
|
||||
else
|
||||
@ -103,7 +103,7 @@ local function parse_flat_table(str)
|
||||
next_index = next_index + 1
|
||||
value = pair
|
||||
end
|
||||
value = value:gsub("^%s*(.-)%s*$", "%1")
|
||||
value = value:match("^%s*(.-)%s*$")
|
||||
success, value = parse_value(value)
|
||||
if not success then return false, value end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user