Expand description
Tokens and token lists.
A token is a u32:
- a character token packs a command code and a character:
(cmd << 21) | chr, withchr ≤ 0x1F_FFFF. The command is usually a category code (≤ 15), but LuaTeX’stoken.create(chr, cmd)andtoken.newmake such tokens for any command (e.g.char_given); - a control-sequence token is
CS_TOKEN_FLAG + cs, wherecsis the id of the control sequence in the hash table.
Inside macro definitions TeX also uses match (13) and end_match (14)
tokens in the parameter text and out_param (5) tokens in the body.
Structs§
Constants§
- CS_
TOKEN_ FLAG - The offset of control-sequence tokens.
Functions§
- empty_
list - The empty token list.
Type Aliases§
- Token
List - An immutable, shared token list (a macro body, the contents of a token register, …).