A token is an input unit a macro can match, such as the number `6`. It is not yet a typed Rust value: the compiler checks the macro’s output afterward. section 22.2
A macro can require an exact token sequence. For example, a pattern for `6` does not match `66`; other patterns can capture input as an expression, statement, or token tree. section 22.2
macro_rules! might_print {
(THis is strange input 하하はは哈哈 but it still works) => {
println!("You guessed the secret message!")
};
() => {
println!("You didn't guess it");
};
}
fn main() {
might_print!(THis is strange input 하하はは哈哈 but it still works);
might_print!();
}
This macro matches an unusual input containing characters from several writing systems, showing that token input need not be ordinary numbers or ASCII text. section 22.2






























