summaryrefslogtreecommitdiff
path: root/tex/context/base/l-aux.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/l-aux.lua')
-rw-r--r--tex/context/base/l-aux.lua13
1 files changed, 10 insertions, 3 deletions
diff --git a/tex/context/base/l-aux.lua b/tex/context/base/l-aux.lua
index c577fb104..e422a2313 100644
--- a/tex/context/base/l-aux.lua
+++ b/tex/context/base/l-aux.lua
@@ -89,9 +89,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
@@ -110,7 +110,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)
@@ -161,6 +161,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)