diff options
Diffstat (limited to 'chomp-macro/tests/ratata.rs')
-rw-r--r-- | chomp-macro/tests/ratata.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/chomp-macro/tests/ratata.rs b/chomp-macro/tests/ratata.rs new file mode 100644 index 0000000..869ad61 --- /dev/null +++ b/chomp-macro/tests/ratata.rs @@ -0,0 +1,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(); +} |