correct printing of lists when double_quotes is set to atom
This commit is contained in:
@@ -339,8 +339,10 @@ impl<'a, Formatter: HCValueFormatter, Outputter: HCValueOutputter>
|
||||
}
|
||||
// self.expand_char_list(s);
|
||||
} else { // for now, == DoubleQuotes::Atom
|
||||
let borrowed_str = s.borrow();
|
||||
|
||||
self.outputter.append("\"");
|
||||
self.outputter.append(s.borrow().as_str());
|
||||
self.outputter.append(&borrowed_str[s.cursor() ..]);
|
||||
self.outputter.append("\"");
|
||||
},
|
||||
Constant::Usize(i) =>
|
||||
|
||||
@@ -49,7 +49,7 @@ impl<'a> Reader<'a> {
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fn push_stub_addr(&mut self) {
|
||||
let h = self.machine_st.heap.h;
|
||||
self.machine_st.heap.push(HeapCellValue::Addr(Addr::HeapCell(h)));
|
||||
|
||||
@@ -64,6 +64,11 @@ impl StringList {
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn cursor(&self) -> usize {
|
||||
self.cursor
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn head(&self) -> Option<char> {
|
||||
self.borrow()[self.cursor ..].chars().next()
|
||||
|
||||
Reference in New Issue
Block a user