Skip to main content

expression

Macro expression 

Source
macro_rules! expression {
    (<$nt:ident> $($tt:tt)*) => { ... };
    ($t:literal $($tt:tt)*) => { ... };
    (@collect [$($collected:expr),*] <$nt:ident> $($rest:tt)*) => { ... };
    (@collect [$($collected:expr),*] $t:literal $($rest:tt)*) => { ... };
    (@collect [$($collected:expr),*]) => { ... };
}
Expand description

Create an expression from a series of terms

bnf::expression!(<a> "and" <b>);