summaryrefslogtreecommitdiff
path: root/chomp-macro/tests/ratata.rs
blob: 869ad613b66d323e34ad8ea38ba3385f349100d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
chomp_macro::nibble! {
    let opt(x) = _ | x;
    let plus(x) = [rec](x . opt(rec));
    match plus(("r" | "t") . "a");
}

#[test]
fn ratata_ratata() {
    Ast::parse_str("ratata").unwrap();
}

#[test]
fn ratata_ratarataratatata() {
    Ast::parse_str("ratarataratatata").unwrap();
}