Expand description
This crate provides pq!, a powerful macro for quoting Rust syntax.
Similar to the well-known quote! macro, pq! is intended for use in proc-macros and
code-generation tools. It allows you to write Rust code and treat it as data (specifically, as a
TokenStream).
pq! distinguishes itself from quote! by providing additional features for greater
expressiveness. In particular, pq! can:
- interpolate arbitrary expressions instead of just identifiers;
- embed control flow and other statements (not just repetition) directly into the sequence of tokens to be quoted.
Re-exports§
pub use proc_macro2::TokenStream;pub use quote::ToTokens;
Macros§
- pq
- Quotes its argument tokens, yielding a TokenStream.