compose-idents 0.3.0

A Rust macro for generating new identifiers (names of variables, functions, traits, etc) by concatenating one or more arbitrary parts and applying other manipulations.
Documentation
1
2
3
4
5
6
7
8
9
10
11
use crate::ast::Alias;
use crate::util::unique_id::next_unique_id;
use syn::parse::{Parse, ParseStream};
use syn::Ident;

impl Parse for Alias {
    fn parse(input: ParseStream) -> syn::Result<Self> {
        let ident: Ident = input.parse()?;
        Ok(Alias::new(next_unique_id(), ident))
    }
}