summaryrefslogtreecommitdiff
path: root/scripts/context/lua/mtxrun.lua
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/context/lua/mtxrun.lua')
-rw-r--r--scripts/context/lua/mtxrun.lua13
1 files changed, 10 insertions, 3 deletions
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index ceb9cb886..815d97235 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -2886,9 +2886,9 @@ function aux.settings_to_hash_strict(str,existing)
end
end
-local seperator = comma * space^0
+local separator = comma * space^0
local value = lpeg.P(lbrace * lpeg.C((nobrace + nested)^0) * rbrace) + lpeg.C((nested + (1-comma))^0)
-local pattern = lpeg.Ct(value*(seperator*value)^0)
+local pattern = lpeg.Ct(value*(separator*value)^0)
-- "aap, {noot}, mies" : outer {} removes, leading spaces ignored
@@ -2907,7 +2907,7 @@ local function set(t,v)
end
local value = lpeg.P(lpeg.Carg(1)*value) / set
-local pattern = value*(seperator*value)^0 * lpeg.Carg(1)
+local pattern = value*(separator*value)^0 * lpeg.Carg(1)
function aux.add_settings_to_array(t,str)
return pattern:match(str, nil, t)
@@ -2958,6 +2958,13 @@ function aux.settings_to_set(str,t)
return t
end
+local value = lbrace * lpeg.C((nobrace + nested)^0) * rbrace
+local pattern = lpeg.Ct((space + value)^0)
+
+function aux.arguments_to_table(str)
+ return pattern:match(str)
+end
+
-- temporary here
function aux.getparameters(self,class,parentclass,settings)