summaryrefslogtreecommitdiff
path: root/otfl-node-res.lua
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2009-11-15 17:10:27 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2009-11-15 17:10:27 +0200
commit78d506538016cd295d9a84ac62e3e036f23feffc (patch)
tree4ce6ccaf20af843787f3f15ebc79df3b632d6c11 /otfl-node-res.lua
parentf3fdfa5bee1dad0307347ba6f14b22f0e19053a6 (diff)
downloadluaotfload-78d506538016cd295d9a84ac62e3e036f23feffc.tar.gz
updating to latest (beta 2009.11.13) ConTeXt code
Diffstat (limited to 'otfl-node-res.lua')
-rw-r--r--otfl-node-res.lua29
1 files changed, 28 insertions, 1 deletions
diff --git a/otfl-node-res.lua b/otfl-node-res.lua
index 4f2cf5a..f147981 100644
--- a/otfl-node-res.lua
+++ b/otfl-node-res.lua
@@ -1,6 +1,6 @@
if not modules then modules = { } end modules ['node-res'] = {
version = 1.001,
- comment = "companion to node-ini.tex",
+ comment = "companion to node-ini.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
license = "see context related readme files"
@@ -60,6 +60,8 @@ local glyph = nodes.register(new_node("glyph",0))
local textdir = nodes.register(new_node("whatsit",7))
local rule = nodes.register(new_node("rule"))
local latelua = nodes.register(new_node("whatsit",35))
+--~ local user = nodes.register(new_node("user_defined"))
+local user = nodes.register(new_node(44))
function nodes.glyph(fnt,chr)
local n = copy_node(glyph)
@@ -109,6 +111,31 @@ function nodes.latelua(code)
return n
end
+function nodes.usernumber(num)
+ local n = copy_node(user)
+ n.type = 100
+ if num then n.value = num end
+ return n
+end
+function nodes.userstring(str)
+ local n = copy_node(user)
+ n.type = 115
+ if str then n.value = str end
+ return n
+end
+function nodes.userlist(list)
+ local n = copy_node(user)
+ n.type = 110
+ if list then n.value = list end
+ return n
+end
+function nodes.usertokens(tokens)
+ local n = copy_node(user)
+ n.type = 116
+ if tokens then n.value = tokens end
+ return n
+end
+
statistics.register("cleaned up reserved nodes", function()
return format("%s nodes, %s lists of %s", nodes.cleanup_reserved(tex.count["lastallocatedbox"]))
end) -- \topofboxstack