From 7d7e0d3c8d778650105cfb479f31a2bb54d69d50 Mon Sep 17 00:00:00 2001 From: Marius Date: Thu, 19 Aug 2010 10:29:42 +0300 Subject: beta 2010.08.19 01:08 --- tex/context/base/node-ser.lua | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'tex/context/base/node-ser.lua') diff --git a/tex/context/base/node-ser.lua b/tex/context/base/node-ser.lua index b6e72f9fb..0b8b2212e 100644 --- a/tex/context/base/node-ser.lua +++ b/tex/context/base/node-ser.lua @@ -9,18 +9,20 @@ if not modules then modules = { } end modules ['node-ser'] = { -- beware, some field names will change in a next releases -- of luatex; this is pretty old code that needs an overhaul -local type, format, concat = type, string.format, table.concat +local type, format, concat, rep = type, string.format, table.concat, string.rep local ctxcatcodes = tex.ctxcatcodes +local nodes, node = nodes, node + local traverse = node.traverse local node_fields = node.fields local node_type = node.type -local nodecodes = nodes.nodecodes +local nodecodes = nodes.nodecodes -local hlist = nodecodes.hlist -local vlist = nodecodes.vlist +local hlist_code = nodecodes.hlist +local vlist_code = nodecodes.vlist local expand = table.tohash { "list", -- list_ptr & ins_ptr & adjust_ptr @@ -241,8 +243,8 @@ function nodes.list(head,n) -- name might change to nodes.type end while head do local id = head.id - tex.print(string.rep(" ",n or 0) .. tostring(head) .. "\n") - if id == hlist or id == vlist then + tex.print(rep(" ",n or 0) .. tostring(head) .. "\n") + if id == hlist_code or id == vlist_code then nodes.list(head.list,(n or 0)+1) end head = head.next @@ -255,8 +257,8 @@ end function nodes.print(head,n) while head do local id = head.id - texio.write_nl(string.rep(" ",n or 0) .. tostring(head)) - if id == hlist or id == vlist then + texio.write_nl(rep(" ",n or 0) .. tostring(head)) + if id == hlist_code or id == vlist_code then nodes.print(head.list,(n or 0)+1) end head = head.next -- cgit v1.2.3