1
2
3
4
5
6
7
8
9
10
11
extern crate proc_macro;

use proc_macro::{Literal, TokenStream, TokenTree};
use proc_macro_hack::proc_macro_hack;

/// Add one to an expression.
#[proc_macro_hack]
pub fn html(input: TokenStream) -> TokenStream {
    println!("{}", input.to_string());
    TokenTree::Literal(Literal::u32_suffixed(42)).into()
}