summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/node-met.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2021-05-27 15:18:45 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2021-05-27 15:18:45 +0200
commitc1f664df24bd6c6d1222d479e2f0f88856685990 (patch)
tree5edf173ba03060bb27e6069b7b52f286316ff0e6 /tex/context/base/mkiv/node-met.lua
parent7c744583eb2b9ba70d09bbac7be7bb9e6eb6b154 (diff)
downloadcontext-c1f664df24bd6c6d1222d479e2f0f88856685990.tar.gz
2021-05-27 14:14:00
Diffstat (limited to 'tex/context/base/mkiv/node-met.lua')
-rw-r--r--tex/context/base/mkiv/node-met.lua73
1 files changed, 0 insertions, 73 deletions
diff --git a/tex/context/base/mkiv/node-met.lua b/tex/context/base/mkiv/node-met.lua
index c39c9dd86..45639b5ba 100644
--- a/tex/context/base/mkiv/node-met.lua
+++ b/tex/context/base/mkiv/node-met.lua
@@ -558,76 +558,3 @@ metatable.__unm = function(head)
n_setnext(last)
return first
end
-
--- see node-nut.lua for more info on going nuts
-
--- if not gonuts then
---
--- local nuts = { }
--- nodes.nuts = nuts
---
--- local function dummy(f) return f end
---
--- nodes.vianuts = dummy
--- nodes.vianodes = dummy
---
--- for k, v in next, nodes do
--- if type(v) == "function" then
--- nuts[k] = v
--- end
--- end
---
--- end
-
--- also handy
-
-local tonode = nodes.tonode
-local whatsit_code = nodecodes.whatsit
-local getfields = node.fields
-local sort = table.sort
-local whatsitkeys = { }
-local keys = { whatsit = whatsitkeys }
-local messyhack = table.tohash { -- temporary solution
- nodecodes.attributelist,
- nodecodes.attribute,
- nodecodes.action, -- hm
-}
-
-setmetatableindex(keys,function(t,k)
- local v = (k == "attributelist" or k == nodecodes.attributelist) and { } or getfields(k)
- if messyhack[k] then
- for i=1,#v do
- if v[i] == "subtype" then
- remove(v,i)
- break
- end
- end
- end
- if v[ 0] then v[#v+1] = "next" v[ 0] = nil end
- if v[-1] then v[#v+1] = "prev" v[-1] = nil end
- sort(v)
- t[k] = v
- return v
-end)
-
-setmetatableindex(whatsitkeys,function(t,k)
- local v = getfields(whatsit_code,k)
- if v[ 0] then v[#v+1] = "next" v[ 0] = nil end
- if v[-1] then v[#v+1] = "prev" v[-1] = nil end
- sort(v)
- t[k] = v
- return v
-end)
-
-local function nodefields(n)
- n = tonode(n)
- local id = n.id
- if id == whatsit_code then
- return whatsitkeys[n.subtype]
- else
- return keys[id]
- end
-end
-
-nodes.keys = keys -- [id][subtype]
-nodes.fields = nodefields -- (n)