Module proc_macro::quote
source · 🔬This is a nightly-only experimental API. (
proc_macro_internals
#27812)Expand description
Quasiquoter
This file contains the implementation internals of the quasiquoter provided by quote!
.
This quasiquoter uses macros 2.0 hygiene to reliably access
items from proc_macro
, to build a proc_macro::TokenStream
.
Macros
- Simpler version of the real
quote!
macro, implemented solely throughmacro_rules
, for bootstrapping the real implementation (see thequote
function), which does not have access to the realquote!
macro due to theproc_macro
crate not being able to depend on itself.
Functions
- quoteExperimentalQuote a
TokenStream
into aTokenStream
. This is the actual implementation of thequote!()
proc macro. - quote_spanExperimentalQuote a
Span
into aTokenStream
. This is needed to implement a custom quoter.