summaryrefslogtreecommitdiff
path: root/tex/context/base/strc-ref.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/strc-ref.lua')
-rw-r--r--tex/context/base/strc-ref.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/tex/context/base/strc-ref.lua b/tex/context/base/strc-ref.lua
index 4c94fbbe7..001a52a75 100644
--- a/tex/context/base/strc-ref.lua
+++ b/tex/context/base/strc-ref.lua
@@ -7,6 +7,7 @@ if not modules then modules = { } end modules ['strc-ref'] = {
}
local format, find, gmatch, match, concat = string.format, string.find, string.gmatch, string.match, table.concat
+local lpegmatch = lpeg.match
local texsprint, texwrite, texcount = tex.sprint, tex.write, tex.count
local trace_referencing = false trackers.register("structure.referencing", function(v) trace_referencing = v end)
@@ -133,11 +134,11 @@ local special_reference = special * lparent * (operation * optional_arguments +
local scanner = (reset * outer_reference * (special_reference + inner_reference)^-1 * -1) / function() return result end
--~ function jobreferences.analyse(str) -- overloaded
---~ return scanner:match(str)
+--~ return lpegmatch(scanner,str)
--~ end
function jobreferences.split(str)
- return scanner:match(str or "")
+ return lpegmatch(scanner,str or "")
end
--~ print(table.serialize(jobreferences.analyse("")))
@@ -502,7 +503,7 @@ local function resolve(prefix,reference,args,set) -- we start with prefix,refere
if d then
resolve(prefix,d[2],nil,set)
else
- local var = scanner:match(ri)
+ local var = lpegmatch(scanner,ri)
if var then
var.reference = ri
if not var.outer and var.inner then