[][src]Macro kernel::count_expressions

macro_rules! count_expressions {
    () => { ... };
    ($head:expr) => { ... };
    ($head:expr, $($tail:expr),*) => { ... };
}

Count the number of passed expressions. Useful for constructing variable sized arrays in other macros. Taken from the Little Book of Rust Macros

This example is not tested
use kernel:count_expressions;

let count: usize = count_expressions!(1+2, 3+4);