From 56f9d3ce8565f328fec8f2ecacf21f0035a11e16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Fabian=20Kr=C3=BCger?= Date: Tue, 7 Jul 2020 16:52:06 +0200 Subject: [PATCH] Adapt to new engine --- luametalatex-firstcode.lua | 10 +++++----- luametalatex-lateinit.lua | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/luametalatex-firstcode.lua b/luametalatex-firstcode.lua index b75d93c..476cc15 100644 --- a/luametalatex-firstcode.lua +++ b/luametalatex-firstcode.lua @@ -23,13 +23,13 @@ local function scan_filename() tok = token.scan_token() cmd = tok.command until cmd ~= spacer_cmd and cmd ~= relax_cmd - while (tok.command <= 12 and tok.mode <= token.biggest_char() + while (tok.command <= 12 and tok.index <= token.biggest_char() or (token.put_next(tok) and false)) - and (quoted or tok.mode ~= string.byte' ') do - if tok.mode == string.byte'"' then + and (quoted or tok.index ~= string.byte' ') do + if tok.index == string.byte'"' then quoted = not quoted else - name[#name+1] = tok.mode + name[#name+1] = tok.index end tok = token.scan_token() end @@ -109,7 +109,7 @@ token.luacmd("immediate", function() -- \immediate if next_tok.command ~= lua_call_cmd then return token.put_next(next_tok) end - local function_id = next_tok.mode + local function_id = next_tok.index return functions[function_id](function_id, 'immediate') end, "protected") -- functions[43] = function() -- \pdfvariable diff --git a/luametalatex-lateinit.lua b/luametalatex-lateinit.lua index b4f7fcf..dd867a8 100644 --- a/luametalatex-lateinit.lua +++ b/luametalatex-lateinit.lua @@ -48,11 +48,11 @@ function token.luacmd(name, func, ...) local tok = token.create(name) local cmd = tok.command if cmd == lua_value_cmd then - idx = tok.mode + idx = tok.index elseif cmd == lua_call_cmd then - idx = tok.mode + idx = tok.index elseif cmd == lua_expandable_call_cmd then - idx = tok.mode + idx = tok.index elseif ... == 'force' then idx = new_luafunction(name) set_lua(name, idx, select(2, ...))