Macro synom::tuple [] [src]

macro_rules! tuple {
    ($i:expr, $($rest:tt)*) => { ... };
}

Run a series of parsers and produce all of the results in a tuple.

extern crate syn;
#[macro_use] extern crate synom;

use syn::Ty;
use syn::parse::ty;

named!(two_types -> (Ty, Ty), tuple!(ty, ty));

fn main() {
    let input = "&str  Map<K, V>";

    let parsed = two_types(input).expect("two types");

    println!("{:?}", parsed);
}