macro_rules! proc_macro_expr_impl { ($( $( #[$attr:meta] )* pub fn $func:ident($input:ident: &str) -> String $body:block )+) => { ... }; }
Expand description
Implement a hacky procedural macro that expands to an expression.
ⓘ
proc_macro_expr_impl! {
/// Add one to an expression.
pub fn add_one_impl(input: &str) -> String {
format!("1 + {}", input)
}
}