Adapt to new engine
This commit is contained in:
parent
377d147927
commit
56f9d3ce85
@ -23,13 +23,13 @@ local function scan_filename()
|
|||||||
tok = token.scan_token()
|
tok = token.scan_token()
|
||||||
cmd = tok.command
|
cmd = tok.command
|
||||||
until cmd ~= spacer_cmd and cmd ~= relax_cmd
|
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))
|
or (token.put_next(tok) and false))
|
||||||
and (quoted or tok.mode ~= string.byte' ') do
|
and (quoted or tok.index ~= string.byte' ') do
|
||||||
if tok.mode == string.byte'"' then
|
if tok.index == string.byte'"' then
|
||||||
quoted = not quoted
|
quoted = not quoted
|
||||||
else
|
else
|
||||||
name[#name+1] = tok.mode
|
name[#name+1] = tok.index
|
||||||
end
|
end
|
||||||
tok = token.scan_token()
|
tok = token.scan_token()
|
||||||
end
|
end
|
||||||
@ -109,7 +109,7 @@ token.luacmd("immediate", function() -- \immediate
|
|||||||
if next_tok.command ~= lua_call_cmd then
|
if next_tok.command ~= lua_call_cmd then
|
||||||
return token.put_next(next_tok)
|
return token.put_next(next_tok)
|
||||||
end
|
end
|
||||||
local function_id = next_tok.mode
|
local function_id = next_tok.index
|
||||||
return functions[function_id](function_id, 'immediate')
|
return functions[function_id](function_id, 'immediate')
|
||||||
end, "protected")
|
end, "protected")
|
||||||
-- functions[43] = function() -- \pdfvariable
|
-- functions[43] = function() -- \pdfvariable
|
||||||
|
@ -48,11 +48,11 @@ function token.luacmd(name, func, ...)
|
|||||||
local tok = token.create(name)
|
local tok = token.create(name)
|
||||||
local cmd = tok.command
|
local cmd = tok.command
|
||||||
if cmd == lua_value_cmd then
|
if cmd == lua_value_cmd then
|
||||||
idx = tok.mode
|
idx = tok.index
|
||||||
elseif cmd == lua_call_cmd then
|
elseif cmd == lua_call_cmd then
|
||||||
idx = tok.mode
|
idx = tok.index
|
||||||
elseif cmd == lua_expandable_call_cmd then
|
elseif cmd == lua_expandable_call_cmd then
|
||||||
idx = tok.mode
|
idx = tok.index
|
||||||
elseif ... == 'force' then
|
elseif ... == 'force' then
|
||||||
idx = new_luafunction(name)
|
idx = new_luafunction(name)
|
||||||
set_lua(name, idx, select(2, ...))
|
set_lua(name, idx, select(2, ...))
|
||||||
|
Loading…
Reference in New Issue
Block a user