Crate proc_macro1.15.0[−][src]
A support library for macro authors when defining new macros.
This library, provided by the standard distribution, provides the types
consumed in the interfaces of procedurally defined macro definitions such as
function-like macros #[proc_macro]
, macro attribures #[proc_macro_attribute]
and
custom derive attributes#[proc_macro_derive]
.
Note that this crate is intentionally bare-bones currently. This functionality is intended to be expanded over time as more surface area for macro authors is stabilized.
See the book for more.
Modules
token_stream |
[ Experimental ] Public implementation details for the |
Macros
quote |
[ Experimental ]
|
Structs
LexError |
Error returned from |
TokenStream |
The main type provided by this crate, representing an abstract stream of tokens, or, more specifically, a sequence of token trees. The type provide interfaces for iterating over those token trees and, conversely, collecting a number of token trees into one stream. |
Diagnostic |
[ Experimental ] A structure representing a diagnostic message and associated children messages. |
Group |
[ Experimental ] A delimited token stream. |
Ident |
[ Experimental ] An identifier ( |
LineColumn |
[ Experimental ] A line-column pair representing the start or end of a |
Literal |
[ Experimental ] A literal string ( |
Punct |
[ Experimental ] An |
SourceFile |
[ Experimental ] The source file of a given |
Span |
[ Experimental ] A region of source code, along with macro expansion information. |
Enums
Delimiter |
[ Experimental ] Describes how a sequence of token trees is delimited. |
Level |
[ Experimental ] An enum representing a diagnostic level. |
Spacing |
[ Experimental ] Whether an |
TokenTree |
[ Experimental ] A single token or a delimited sequence of token trees (e.g. |
Functions
quote_span |
[ Experimental ] Quote a |