summaryrefslogtreecommitdiff
path: root/src/fontloader/runtime/fontloader-fontloader.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2015-05-03 22:30:08 +0200
committerPhilipp Gesang <phg@phi-gamma.net>2015-05-03 22:30:08 +0200
commit136826a4dc6e9505ed1ff1cfa6c862451a4a280a (patch)
treed9978782b40498607b9f3f05e70943bd0d9bd596 /src/fontloader/runtime/fontloader-fontloader.lua
parenta5a66bb26ea893b627941d1d7bf63143b61b8d91 (diff)
downloadluaotfload-136826a4dc6e9505ed1ff1cfa6c862451a4a280a.tar.gz
[fontloader] sync with Context as of 2015-05-03
Diffstat (limited to 'src/fontloader/runtime/fontloader-fontloader.lua')
-rw-r--r--src/fontloader/runtime/fontloader-fontloader.lua27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/fontloader/runtime/fontloader-fontloader.lua b/src/fontloader/runtime/fontloader-fontloader.lua
index 1d6509a..fba5742 100644
--- a/src/fontloader/runtime/fontloader-fontloader.lua
+++ b/src/fontloader/runtime/fontloader-fontloader.lua
@@ -1,6 +1,6 @@
-- merged file : luatex-fonts-merged.lua
-- parent file : luatex-fonts.lua
--- merge date : 04/18/15 14:41:50
+-- merge date : 05/01/15 18:45:14
do -- begin closure to overcome local limits and interference
@@ -699,6 +699,31 @@ local function make(t)
end
return p
end
+local function collapse(t,x)
+ if type(t)~="table" then
+ return t,x
+ else
+ local n=next(t)
+ if n==nil then
+ return t,x
+ elseif next(t,n)==nil then
+ local k=n
+ local v=t[k]
+ if type(v)=="table" then
+ return collapse(v,x..k)
+ else
+ return v,x..k
+ end
+ else
+ local tt={}
+ for k,v in next,t do
+ local vv,kk=collapse(v,k)
+ tt[kk]=vv
+ end
+ return tt,x
+ end
+ end
+end
function lpeg.utfchartabletopattern(list)
local tree={}
local n=#list