4 stable releases

1.0.3 Mar 6, 2024
1.0.2 Mar 5, 2024
1.0.1 Mar 4, 2024

#753 in Procedural macros

Download history 28/week @ 2024-07-30 1/week @ 2024-09-17 14/week @ 2024-09-24

121 downloads per month

MIT/Apache

7KB

quote-alias

A helper macro for easily reusing static token streams.

Documentation


lib.rs:

The alias! macro can be used to assign token streams to convenient identifiers.

use quote::quote;
use quote_alias::alias;

alias! {
    Foo(my_crate::Foo),
}

// same as: quote! { my_crate::Foo::new() };
let create_foo = quote! { #Foo::new() };

See alias! for more detailed documentation and usage examples.

Dependencies

~77KB