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