summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/node-ini.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2018-07-25 20:24:04 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2018-07-25 20:24:04 +0200
commit669436bb34437aee17f1823836cbbb16c570a505 (patch)
tree3d8c61e22805ff719007c10a44a8de0417211b00 /tex/context/base/mkiv/node-ini.lua
parentdeab0bfe7f4be57121779e93bf291e518fda7cf3 (diff)
downloadcontext-669436bb34437aee17f1823836cbbb16c570a505.tar.gz
2018-07-25 19:49:00
Diffstat (limited to 'tex/context/base/mkiv/node-ini.lua')
-rw-r--r--tex/context/base/mkiv/node-ini.lua35
1 files changed, 34 insertions, 1 deletions
diff --git a/tex/context/base/mkiv/node-ini.lua b/tex/context/base/mkiv/node-ini.lua
index 9b35f29f6..47c1b88e1 100644
--- a/tex/context/base/mkiv/node-ini.lua
+++ b/tex/context/base/mkiv/node-ini.lua
@@ -385,7 +385,7 @@ nodes.pdfliteralvalues = pdfliteralvalues
dirvalues.lefttoright = 0
dirvalues.righttoleft = 1
-nodes.subtypes = {
+nodes.subtypes = allocate {
[nodecodes.accent] = accentcodes,
[nodecodes.boundary] = boundarycodes,
[nodecodes.dir] = dircodes,
@@ -405,6 +405,12 @@ nodes.subtypes = {
[nodecodes.whatsit] = whatcodes,
}
+table.setmetatableindex(nodes.subtypes,function(t,k)
+ local v = { }
+ t[k] = v
+ return v
+end)
+
nodes.skipcodes = gluecodes -- more friendly
nodes.directioncodes = dircodes -- more friendly
nodes.whatsitcodes = whatcodes -- more official
@@ -492,3 +498,30 @@ end
if node.fix_node_lists then
node.fix_node_lists(false)
end
+
+-- a temp hack
+
+if LUATEXFUNCTIONALITY < 6866 then
+
+ local texnest = tex.nest
+ local texlist = tex.list
+
+ function tex.getnest(k)
+ if not k or k == "top" then
+ return texnest[texnest.ptr]
+ end
+ if k == "ptr" then
+ return texnest.ptr
+ end
+ return texnest[k]
+ end
+
+ function tex.getlist(k)
+ return texlist[k]
+ end
+
+ function tex.setlist(k,v)
+ texlist[k] = v
+ end
+
+end