diff options
author | Hans Hagen <pragma@wxs.nl> | 2019-02-07 19:16:06 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2019-02-07 19:16:06 +0100 |
commit | 99dc1cd9bb77ac9fa68b0584f58f57749994fdba (patch) | |
tree | ab184c40b11270cec9c311beb0e190913471e47f /tex/context/base/mkiv/cldf-ini.lua | |
parent | 38a9804bf0448f3c987903d2601175f1750e9fe3 (diff) | |
download | context-99dc1cd9bb77ac9fa68b0584f58f57749994fdba.tar.gz |
2019-02-07 18:55:00
Diffstat (limited to 'tex/context/base/mkiv/cldf-ini.lua')
-rw-r--r-- | tex/context/base/mkiv/cldf-ini.lua | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tex/context/base/mkiv/cldf-ini.lua b/tex/context/base/mkiv/cldf-ini.lua index 0f90f058e..489ed1158 100644 --- a/tex/context/base/mkiv/cldf-ini.lua +++ b/tex/context/base/mkiv/cldf-ini.lua @@ -6,6 +6,8 @@ if not modules then modules = { } end modules ['cldf-ini'] = { license = "see context related readme files" } +-- todo: {token} -> 3 tokens + -- This started as an experiment: generating context code at the lua end. After all -- it is surprisingly simple to implement due to metatables. I was wondering if -- there was a more natural way to deal with commands at the lua end. Of course it's @@ -899,6 +901,30 @@ if tokenflushmode then -- combine them return f end) +-- core = setmetatableindex(function(parent,k) +-- local t +-- local f = function(first,...) +-- if not t then +-- t = toks[k] +-- end +-- local f = function(first,...) +-- if first == nil then +-- flush(t) +-- else +-- return writer(context,t,first,...) +-- end +-- end +-- parent[k] = f +-- if first == nil then +-- flush(t) +-- else +-- return writer(context,t,first,...) +-- end +-- end +-- parent[k] = f +-- return f +-- end) + core.cs = setmetatableindex(function(parent,k) local t local f = function() |