add callable is/2

This commit is contained in:
Mark Thom
2018-01-19 00:08:55 -07:00
parent 1b402b2673
commit f9b53856ac
8 changed files with 353 additions and 247 deletions

View File

@@ -146,14 +146,16 @@ impl HeapCellValueFormatter for TermFormatter {
pub struct HeapCellPrinter<'a, Formatter, Outputter> {
formatter: Formatter,
outputter: Outputter,
iter: HeapCellIterator<'a>,
iter: HeapCellPreOrderIterator<'a>,
state_stack: Vec<TokenOrRedirect>
}
impl<'a, Formatter: HeapCellValueFormatter, Outputter: HeapCellValueOutputter>
HeapCellPrinter<'a, Formatter, Outputter>
{
pub fn new(iter: HeapCellIterator<'a>, formatter: Formatter, outputter: Outputter) -> Self {
pub fn new(iter: HeapCellPreOrderIterator<'a>, formatter: Formatter, outputter: Outputter)
-> Self
{
HeapCellPrinter { formatter, outputter, iter, state_stack: vec![] }
}