[][src]Function bogobble::repeater::reflect

pub fn reflect<'a, A, B, C>(a: A, b: B, c: C) -> Reflect<A, B, C> where
    A: Parser<'a>,
    B: Parser<'a>,
    C: Parser<'a>, 

A function for making sure number match on both sides of an equals

use bogobble::*;
let p = reflect(ws_("("),Alpha.min_n(1),ws_(")"));

let (av,b,cv) =p.parse_s("(((help)))").unwrap();

assert_eq!(av,vec!["(","(","("]);
assert_eq!(b,"help".to_string());
assert_eq!(cv,vec![")",")",")"]);

let r2 = p.parse_s("(((no))");
assert!(r2.is_err());