<!-- {{# generate.module_header{} #}} -->
# Module :: proc_macro_tools
[](https://github.com/emersion/stability-badges#experimental) [](https://github.com/Wandalen/wTools/actions/workflows/ModuleProcMacroToolsPush.yml) [](https://docs.rs/proc_macro_tools) [](https://gitpod.io/#RUN_PATH=.,SAMPLE_FILE=sample%2Frust%2Fproc_macro_tools_trivial_sample%2Fsrc%2Fmain.rs,RUN_POSTFIX=--example%20proc_macro_tools_trivial_sample/https://github.com/Wandalen/wTools) [](https://discord.gg/m3YfbXpUUY)
Tools for writing procedural macroses.
### Sample
<!-- {{# generate.module_sample{} #}} -->
```rust
#[ cfg( feature = "use_std" ) ]
{
use proc_macro_tools::*;
let code = qt!( core::option::Option< i8, i16, i32, i64 > );
let tree_type = syn::parse2::< syn::Type >( code ).unwrap();
let got = type_parameters( &tree_type, 0..=2 );
got.iter().for_each( | e | println!( "{}", qt!( #e ) ) );
/* print :
i8
i16
i32
*/
}
```
### To add to your project
```sh
cargo add proc_macro_tools
```
### Try out from the repository
```sh
git clone https://github.com/Wandalen/wTools
cd wTools
cd sample/rust/proc_macro_tools_trivial
cargo run
```