abstract Outputter of heap_print

This commit is contained in:
Mark Thom
2018-01-15 20:18:08 -07:00
parent 579b9f21dc
commit f265546203
4 changed files with 126 additions and 61 deletions

View File

@@ -1,6 +1,7 @@
use prolog::ast::*;
use prolog::codegen::*;
use prolog::debray_allocator::*;
use prolog::heap_print::*;
use prolog::machine::*;
use termion::raw::IntoRawMode;
@@ -440,7 +441,7 @@ pub fn print(wam: &mut Machine, result: EvalSession) {
loop {
let mut result = EvalSession::QueryFailure;
let bindings = wam.heap_view(&heap_locs);
let bindings = wam.heap_view::<PrinterOutputter>(&heap_locs);
let stdin = stdin();
let mut stdout = stdout().into_raw_mode().unwrap();