I am dynamically generating some proc macros and am in a situation where I need to write a quote! block that contains another quote! block including interpolations on the inner quote! block. I would like to escape the # somehow within the inner quote! block so that the outer/real quote! block does not interpret them as interpolations. Is this possible?
quote! {
// ...
quote! {
// I need to escape these interpolations so they are copied verbatim
// and ignored by the outer `quote!` block
let #some_ident = #some_value;
}
// ...
}
I am dynamically generating some proc macros and am in a situation where I need to write a
quote!
block that contains anotherquote!
block including interpolations on the innerquote!
block. I would like to escape the#
somehow within the innerquote!
block so that the outer/realquote!
block does not interpret them as interpolations. Is this possible?