diff options
author | Hans Hagen <pragma@wxs.nl> | 2011-04-11 16:45:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2011-04-11 16:45:00 +0200 |
commit | 612f23ed1b01240fdc9ca5132dbd3164e96ed570 (patch) | |
tree | 8eafde3944b1b46eae32e68b240a5eb9cf5f71fc /tex/context/base/util-prs.lua | |
parent | 0bd8dee4e7e38cfb027bf788505de24aca28261c (diff) | |
download | context-612f23ed1b01240fdc9ca5132dbd3164e96ed570.tar.gz |
beta 2011.04.11 16:45
Diffstat (limited to 'tex/context/base/util-prs.lua')
-rw-r--r-- | tex/context/base/util-prs.lua | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/tex/context/base/util-prs.lua b/tex/context/base/util-prs.lua index 617dc0c78..591453760 100644 --- a/tex/context/base/util-prs.lua +++ b/tex/context/base/util-prs.lua @@ -6,18 +6,20 @@ if not modules then modules = { } end modules ['util-prs'] = { license = "see context related readme files" } +local P, R, V, C, Ct, Carg = lpeg.P, lpeg.R, lpeg.V, lpeg.C, lpeg.Ct, lpeg.Carg +local lpegmatch = lpeg.match +local concat, format, gmatch = table.concat, string.format, string.gmatch +local tostring, type, next = tostring, type, next + utilities = utilities or {} utilities.parsers = utilities.parsers or { } local parsers = utilities.parsers parsers.patterns = parsers.patterns or { } --- we could use a Cf Cg construct +local setmetatableindex = table.setmetatableindex +local sortedhash = table.sortedhash -local P, R, V, C, Ct, Carg = lpeg.P, lpeg.R, lpeg.V, lpeg.C, lpeg.Ct, lpeg.Carg -local lpegmatch = lpeg.match -local concat, format, gmatch = table.concat, string.format, string.gmatch -local tostring, type, next, setmetatable = tostring, type, next, setmetatable -local sortedhash = table.sortedhash +-- we could use a Cf Cg construct local escape, left, right = P("\\"), P('{'), P('}') @@ -216,7 +218,7 @@ function parsers.getparameters(self,class,parentclass,settings) sp = { } self[parentclass] = sp end - setmetatable(sc, { __index = sp }) + setmetatableindex(sc,sp) end end parsers.settings_to_hash(settings,sc) |