tree_print

Macro tree_print 

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

Macro for diagnostics purpose to print both syntax tree and source code behind it with 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 );