pub fn recursive<'a, I, O, E, F, P>(f: F) -> Recursive<'a, I, O, E>Expand description
再帰パーサーを構築する。
クロージャ f は再帰参照(Recursive)を受け取り、パーサーを組み立てて返す。
返されたパーサーは Box<dyn Parser> として内部に格納される。
ⓘ
let expr = recursive(|expr| {
let atom = integer().or(between(tag("("), expr, tag(")")));
let term = atom.chainl1(mul_op());
term.chainl1(add_op())
});