Module quote
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.
Modules
-
ext
Extension traits used by the implementation of
quote!. These are defined in separate traits, rather than as a single trait due to ambiguity issues.
Structs
Functions
-
collect_meta_vars
Helper function to support macro repetitions like
$( CONTENTS ) SEP_OPT *inquote!. Recursively collects allIdents (meta-variables) that follow a$from the givenCONTENTSstream, preserving their order of appearance. -
quote
Quote a
TokenStreaminto aTokenStream. This is the actual implementation of thequote!()proc macro. -
quote_span
Quote a
Spaninto aTokenStream. This is needed to implement a custom quoter.
Macros
-
minimal_quote
Simpler version of the real
quote!macro, implemented solely throughmacro_rules, for bootstrapping the real implementation (see thequotefunction), which does not have access to the realquote!macro due to theproc_macrocrate not being able to depend on itself. - minimal_quote_ts
- minimal_quote_tt