summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/toks-tra.lua
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2016-02-15 11:15:07 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-02-15 11:15:07 +0100
commita036ac2dd19b592316e1b479360e9e6c6700e935 (patch)
tree321156a4e2af995a7f401e1b773fd8813e3928da /tex/context/base/mkiv/toks-tra.lua
parentd73f5987ca04dbdf0a134236c3314dadd7a73565 (diff)
downloadcontext-a036ac2dd19b592316e1b479360e9e6c6700e935.tar.gz
2016-02-15 10:29:00
Diffstat (limited to 'tex/context/base/mkiv/toks-tra.lua')
-rw-r--r--tex/context/base/mkiv/toks-tra.lua24
1 files changed, 12 insertions, 12 deletions
diff --git a/tex/context/base/mkiv/toks-tra.lua b/tex/context/base/mkiv/toks-tra.lua
index 4b0b82f0a..a1408b0b8 100644
--- a/tex/context/base/mkiv/toks-tra.lua
+++ b/tex/context/base/mkiv/toks-tra.lua
@@ -11,7 +11,7 @@ local format, gsub = string.format, string.gsub
local tostring = tostring
local tokens = tokens
-local newtoken = newtoken or token
+local token = token -- the built in one
local tex = tex
local context = context
local commands = commands
@@ -33,8 +33,8 @@ local report = logs.reporter("tokens","collectors")
-- flush : print back to tex
-- test : fancy stuff
-local get_next = newtoken.get_next
-local create = newtoken.create
+local get_next = token.get_next
+local create_token = token.create
function collectors.install(tag,end_cs)
local data, d = { }, 0
@@ -261,20 +261,20 @@ collectors.dowithwords = collectors.test
-- This is only used in old articles ... will move to a module:
-tokens.vbox = create("vbox")
-tokens.hbox = create("hbox")
-tokens.vtop = create("vtop")
-tokens.bgroup = create(utfbyte("{"),1)
-tokens.egroup = create(utfbyte("}"),2)
+tokens.vbox = create_token("vbox")
+tokens.hbox = create_token("hbox")
+tokens.vtop = create_token("vtop")
+tokens.bgroup = create_token(utfbyte("{"),1)
+tokens.egroup = create_token(utfbyte("}"),2)
-tokens.letter = function(chr) return create(utfbyte(chr),11) end
-tokens.other = function(chr) return create(utfbyte(chr),12) end
+tokens.letter = function(chr) return create_token(utfbyte(chr),11) end
+tokens.other = function(chr) return create_token(utfbyte(chr),12) end
tokens.letters = function(str)
local t, n = { }, 0
for chr in utfvalues(str) do
n = n + 1
- t[n] = create(chr, 11)
+ t[n] = create_token(chr, 11)
end
return t
end
@@ -283,7 +283,7 @@ function collectors.defaultwords(t,str)
if t then
local n = #t
n = n + 1 ; t[n] = tokens.bgroup
- n = n + 1 ; t[n] = create("red")
+ n = n + 1 ; t[n] = create_token("red")
for i=1,#str do
n = n + 1 ; t[n] = tokens.other('*')
end