Skip to main content

Module quote

Module quote 

Source
๐Ÿ”ฌThis is a nightly-only experimental API. (proc_macro_internals)
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.

Modulesยง

ext ๐Ÿ‘ป Experimental
Extension traits used by the implementation of quote!. These are defined in separate traits, rather than as a single trait due to ambiguity issues.

Macrosยง

minimal_quote ๐Ÿ”’ Experimental
Simpler version of the real quote! macro, implemented solely through macro_rules, for bootstrapping the real implementation (see the quote function), which does not have access to the real quote! macro due to the proc_macro crate not being able to depend on itself.
minimal_quote_ts ๐Ÿ”’ Experimental
minimal_quote_tt ๐Ÿ”’ Experimental

Structsยง

HasIterator ๐Ÿ‘ป Experimental
RepInterp ๐Ÿ‘ป Experimental
ThereIsNoIteratorInRepetition ๐Ÿ‘ป Experimental

Functionsยง

collect_meta_vars ๐Ÿ”’ Experimental
Helper function to support macro repetitions like $( CONTENTS ) SEP_OPT * in quote!. Recursively collects all Idents (meta-variables) that follow a $ from the given CONTENTS stream, preserving their order of appearance.
quoteExperimental
Quote a TokenStream into a TokenStream. This is the actual implementation of the quote!() proc macro.
quote_spanExperimental
Quote a Span into a TokenStream. This is needed to implement a custom quoter.