hacky workaround
This commit is contained in:
@@ -229,6 +229,27 @@ impl<'a, Formatter: HCValueFormatter, Outputter: HCValueOutputter>
|
||||
})
|
||||
}
|
||||
|
||||
fn print_constant(&mut self, c: Constant) {
|
||||
match c {
|
||||
Constant::Char(c) if c == '\n' =>
|
||||
self.outputter.append("'\\n'"),
|
||||
// Constant::Char(c) if c == '\f' =>
|
||||
// self.outputter.append("\\f"),
|
||||
Constant::Char(c) if c == '\r' =>
|
||||
self.outputter.append("'\\r'"),
|
||||
Constant::Char(c) if c == '\t' =>
|
||||
self.outputter.append("'\\t'"),
|
||||
// Constant::Char(c) if c == '\b' =>
|
||||
// self.outputter.append("\\b"),
|
||||
// Constant::Char(c) if c == '\\a' =>
|
||||
// self.outputter.append("\a"),
|
||||
// Constant::Char(c) if c == '\\v' =>
|
||||
// self.outputter.append("\\v"),
|
||||
_ =>
|
||||
self.outputter.append(format!("{}", c).as_str())
|
||||
}
|
||||
}
|
||||
|
||||
fn handle_heap_term(&mut self, iter: &mut HCPreOrderIterator)
|
||||
{
|
||||
let heap_val = match self.check_for_seen(iter) {
|
||||
@@ -246,7 +267,7 @@ impl<'a, Formatter: HCValueFormatter, Outputter: HCValueOutputter>
|
||||
self.outputter.append("[]");
|
||||
},
|
||||
HeapCellValue::Addr(Addr::Con(c)) =>
|
||||
self.outputter.append(format!("{}", c).as_str()),
|
||||
self.print_constant(c),
|
||||
HeapCellValue::Addr(Addr::Lis(_)) => {
|
||||
let cell = Rc::new(Cell::new(true));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user