remove partial strings, but represent strings as lists when warranted by double_quotes

This commit is contained in:
Mark Thom
2020-02-12 22:12:42 -07:00
parent 1b5cf493d6
commit 969bd8f82c
19 changed files with 428 additions and 844 deletions

View File

@@ -1,11 +1,12 @@
use prolog_parser::ast::*;
use prolog_parser::string_list::*;
use crate::prolog::forms::PredicateKey;
use crate::prolog::machine::machine_indices::*;
use crate::prolog::machine::machine_state::*;
use crate::prolog::rug::Integer;
use std::rc::Rc;
pub(crate) type MachineStub = Vec<HeapCellValue>;
#[derive(Clone, Copy)]
@@ -392,7 +393,7 @@ pub(super) enum CycleSearchResult {
NotList,
PartialList(usize, usize), // the list length (up to max), and an offset into the heap.
ProperList(usize), // the list length.
String(usize, StringList), // the number of elements iterated, the string tail.
String(usize, usize, Rc<String>), // the number of bytes iterated, the offset, the string.
UntouchedList(usize), // the address of an uniterated Addr::Lis(address).
}