[][src]Function enso_macro_utils::rewrite_stream

pub fn rewrite_stream<F: Fn(TokenTree) -> TokenStream + Copy>(
    input: TokenStream,
    f: F
) -> TokenStream

Rewrites stream replacing each token with a sequence of tokens returned by the given function. The groups (e.g. token tree within braces) are unpacked, rewritten and repacked into groups -- the function is applied recursively.