diff options
author | Marius <mariausol@gmail.com> | 2010-09-03 12:35:26 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2010-09-03 12:35:26 +0300 |
commit | 16895587e51f8243a7e4dc6185979894fb199d4f (patch) | |
tree | 923fe9fe4d34a11202e06a4258ba71bab6ccde8d /tex/context/base/toks-ini.lua | |
parent | 20da4ce347921be291c8804041bd8756e3bf1707 (diff) | |
download | context-16895587e51f8243a7e4dc6185979894fb199d4f.tar.gz |
beta 2010.09.03 11:05
Diffstat (limited to 'tex/context/base/toks-ini.lua')
-rw-r--r-- | tex/context/base/toks-ini.lua | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tex/context/base/toks-ini.lua b/tex/context/base/toks-ini.lua index 67da7fea6..cb2807b24 100644 --- a/tex/context/base/toks-ini.lua +++ b/tex/context/base/toks-ini.lua @@ -135,7 +135,7 @@ function collectors.show(tag, method) end end -function collectors.default_words(t,str) +function collectors.defaultwords(t,str) t[#t+1] = tokens.bgroup t[#t+1] = createtoken("red") for i=1,#str do @@ -144,9 +144,9 @@ function collectors.default_words(t,str) t[#t+1] = tokens.egroup end -function collectors.with_words(tag,handle) +function collectors.dowithwords(tag,handle) local t, w = { }, { } - handle = handle or collectors.default_words + handle = handle or collectors.defaultwords local tagdata = collectordata[tag] for k=1,#tagdata do local v = tagdata[k] @@ -166,7 +166,7 @@ function collectors.with_words(tag,handle) collectordata[tag] = t end -function collectors.show_token(t) +local function showtoken(t) if t then local cmd, chr, id, cs, name = t[1], t[2], t[3], nil, command_name(t) or "" if cmd == letter or cmd == other then @@ -188,9 +188,11 @@ function collectors.show_token(t) end end +collectors.showtoken = showtoken + function collectors.trace() local t = get_next() - texio.write_nl(collectors.show_token(t)) + texio.write_nl(showtoken(t)) return t end |