macro_rules! code_print {
    ( $src:expr ) => { ... };
    ( $( $src:expr ),+ $(,)? ) => { ... };
}
Expand description

Macro for diagnostics purpose to print both syntax tree and source code behind it without syntax tree.

§Basic use-case.

use macro_tools::prelude::*;

let code = qt!( std::collections::HashMap< i32, i32 > );
let tree_type = syn::parse2::< syn::Type >( code ).unwrap();
tree_print!( tree_type );