diff options
Diffstat (limited to 'source/luametatex/source/lua/lmttokenlib.c')
-rw-r--r-- | source/luametatex/source/lua/lmttokenlib.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/source/luametatex/source/lua/lmttokenlib.c b/source/luametatex/source/lua/lmttokenlib.c index e15b2de5a..97ca1b144 100644 --- a/source/luametatex/source/lua/lmttokenlib.c +++ b/source/luametatex/source/lua/lmttokenlib.c @@ -1874,6 +1874,7 @@ static int tokenlib_scan_next_char(lua_State *L) break; case letter_cmd: case other_char_cmd: + case active_char_cmd: /* needs testing */ { char buffer[6]; char *uindex = aux_uni2string((char *) buffer, (unsigned int) cur_chr); @@ -3069,6 +3070,8 @@ static int tokenlib_push_macro(lua_State *L) // todo: just store cmd and flag to /*tex We need to check for a valid hit, but what is best here, for instance using |(cmd >= call_cmd)| is not okay as we miss a lot then. + + Active characters: maybe when we pass a number ... */ if (lua_type(L, 1) == LUA_TSTRING) { size_t lname = 0; @@ -3088,6 +3091,15 @@ static int tokenlib_push_macro(lua_State *L) // todo: just store cmd and flag to return 0; } +static int tokenlib_pop_macro(lua_State *L) +{ + lua_token_package *p = tokenlib_aux_check_ispackage(L, 1); + if (p) { + tex_forced_define(p->how, p->cs, p->flag, p->cmd, p->chr); + } + return 0; +} + char *lmt_get_expansion(halfword head, int *len) { char *str = NULL; @@ -3127,15 +3139,6 @@ static int tokenlib_get_expansion(lua_State* L) return 1; } -static int tokenlib_pop_macro(lua_State *L) -{ - lua_token_package *p = tokenlib_aux_check_ispackage(L, 1); - if (p) { - tex_forced_define(p->how, p->cs, p->flag, p->cmd, p->chr); - } - return 0; -} - static int tokenlib_save_lua(lua_State *L) { halfword f = lmt_tohalfword(L, 1); |