make double_quotes write option not dependent on double_quotes flag

This gives consistent results without depending on another flag.
This commit is contained in:
Markus Triska
2023-07-05 21:22:49 +02:00
parent faef45fd68
commit 3b9b9e75c4
4 changed files with 14 additions and 12 deletions

View File

@@ -487,7 +487,6 @@ pub struct HCPrinter<'a, Outputter> {
iter: StackfulPreOrderHeapIter<'a>,
atom_tbl: &'a mut AtomTable,
op_dir: &'a OpDir,
flags: MachineFlags,
state_stack: Vec<TokenOrRedirect>,
toplevel_spec: Option<DirectedOp>,
last_item_idx: usize,
@@ -555,7 +554,6 @@ impl<'a, Outputter: HCValueOutputter> HCPrinter<'a, Outputter> {
atom_tbl: &'a mut AtomTable,
stack: &'a mut Stack,
op_dir: &'a OpDir,
flags: MachineFlags,
output: Outputter,
cell: HeapCellValue,
) -> Self {
@@ -564,7 +562,6 @@ impl<'a, Outputter: HCValueOutputter> HCPrinter<'a, Outputter> {
iter: stackful_preorder_iter(heap, stack, cell),
atom_tbl,
op_dir,
flags,
state_stack: vec![],
toplevel_spec: None,
last_item_idx: 0,
@@ -1187,7 +1184,7 @@ impl<'a, Outputter: HCValueOutputter> HCPrinter<'a, Outputter> {
let at_cdr = self.outputter.ends_with("|");
if self.double_quotes && self.flags.double_quotes == DoubleQuotes::Chars {
if self.double_quotes {
if !at_cdr && !self.ignore_ops && end_cell.is_string_terminator(&self.iter.heap) {
self.remove_list_children(focus.value() as usize);
return self.print_proper_string(focus.value() as usize, max_depth);