Skip to main content

Module token_lists

Module token_lists 

Source

Structs§

MacroExpansion
A MacroExpansion bundles the TokenList of a macro with its arguments.
Otherize
Struct that allows to write! and format! by converting the string to Tokens and passes them to a closure. All tokens have CommandCode::Other except for space characters. For example, write!(Tokenizer::new(|t| vec.push(t), "ab c") will push four tokens to vec, where the first, second and fourth have CommandCode::Other and the third has CommandCode::Space.
StringCharWrite
Wrapper struct that adds CharWrite to any Write
TokenList
TokenListDisplay
A helper struct that implements Display for TokenList. Needs a CSHandler and a CategoryCodeScheme to resolve control sequences and insert spaces between them properly.

Traits§

CharWrite
An extension of Write that can handle Characters and CSNames (and hence Tokens) directly. Useful, since it allows for directly turning strings into TokenLists using write!, format! etc.