cgp-component-macro-lib 0.3.0

Context-generic programming core component macros implemented as a library.
Documentation
1
2
3
4
5
6
7
8
9
use alloc::string::{String, ToString};

use prettyplease::unparse;
use proc_macro2::TokenStream;
use syn::parse_file;

pub fn format_token_stream(stream: &TokenStream) -> String {
    unparse(&parse_file(&stream.to_string()).unwrap())
}