Expand description
tt
crate defines a TokenTree
data structure: this is the interface (both
input and output) of macros. It closely mirrors proc_macro
crate’s
TokenTree
.
Modules§
- Stateful iteration over token trees.
- A “Parser” structure for token trees. We use this when parsing a declarative macro definition into a list of patterns and templates.
Structs§
- Identifier or keyword.
- A range in text, represented as a pair of
TextSize
. - A measure of text length. Also, equivalently, an index into text.
Enums§
- Indicates whether a token can join with the following token to form a compound token. Used for conversions to
proc_macro::Spacing
. Also used to guide pretty-printing, which is where theJointHidden
value (which isn’t part ofproc_macro::Spacing
) comes in useful.