summaryrefslogtreecommitdiff
path: root/source/luametatex/source/lua/lmttokenlib.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/luametatex/source/lua/lmttokenlib.h')
-rw-r--r--source/luametatex/source/lua/lmttokenlib.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/source/luametatex/source/lua/lmttokenlib.h b/source/luametatex/source/lua/lmttokenlib.h
new file mode 100644
index 000000000..5339a80fe
--- /dev/null
+++ b/source/luametatex/source/lua/lmttokenlib.h
@@ -0,0 +1,52 @@
+/*
+ See license.txt in the root of this project.
+*/
+
+# ifndef LMT_LTOKENLIB_H
+# define LMT_LTOKENLIB_H
+
+typedef enum token_origins {
+ token_origin_lua,
+ token_origin_tex,
+} token_origins;
+
+typedef struct lua_token {
+ int token;
+ token_origins origin;
+} lua_token;
+
+typedef enum command_item_types {
+ unused_command_item,
+ regular_command_item,
+ character_command_item,
+ register_command_item,
+ internal_command_item,
+ reference_command_item,
+ data_command_item,
+ token_command_item,
+ node_command_item,
+} command_item_types;
+
+extern void lmt_token_list_to_lua (lua_State *L, halfword p);
+extern void lmt_token_list_to_luastring (lua_State *L, halfword p, int nospace, int strip);
+extern halfword lmt_token_list_from_lua (lua_State *L, int slot);
+extern halfword lmt_token_code_from_lua (lua_State *L, int slot);
+
+extern void lmt_function_call (int slot, int prefix);
+extern int lmt_function_call_by_class (int slot, int property, halfword *value);
+extern void lmt_token_call (int p);
+extern void lmt_local_call (int slot);
+
+extern char *lmt_get_expansion (halfword head, int *len);
+
+extern void lmt_token_register_to_lua (lua_State *L, halfword t);
+
+extern void lmt_tokenlib_initialize (void);
+
+extern int lmt_push_specification (lua_State *L, halfword ptr, int onlycount);
+
+extern void lmt_push_cmd_name (lua_State *L, int cmd);
+
+extern halfword lmt_macro_to_tok (lua_State* L, int slot, halfword *tail);
+
+# endif