Expand description
Adapted from
proc-macro2Removed wrap proc-macro for correct span outside rust sources Not use in proc-macro context if you don’t know what you do
A substitute implementation of the compiler’s proc_macro API
§Thread-Safety
Most types in this crate are !Sync because the underlying compiler
types make use of thread-local memory, meaning they cannot be accessed from
a different thread.
Modules§
- token_
stream - Public implementation details for the
TokenStreamtype, such as iterators.
Structs§
- Group
- A delimited token stream.
- Ident
- A word of Rust code, which may be a keyword or legal variable name.
- LexError
- Error returned from
TokenStream::from_str. - Line
Column - A line-column pair representing the start or end of a
Span. - Literal
- A literal string (
"hello"), byte string (b"hello"), character ('a'), byte character (b'a'), an integer or floating point number with or without a suffix (1,1u8,2.3,2.3f32). - Punct
- An
Punctis an single punctuation character like+,-or#. - Source
File - The source file of a given
Span. - Span
- A region of source code, along with macro expansion information.
- Token
Stream - An abstract stream of tokens, or more concretely a sequence of token trees.