Struct egg::AstDepth [−][src]
pub struct AstDepth;
Expand description
A simple CostFunction
that counts maximum ast depth.
let e: RecExpr<SymbolLang> = "(do_it foo bar baz)".parse().unwrap();
assert_eq!(AstDepth.cost_rec(&e), 2);