update prolog_parser version, correct atom_chars/2 (#379)

This commit is contained in:
Mark Thom
2020-06-04 23:23:49 -06:00
parent 2a588ff943
commit 72c5908f09
3 changed files with 4 additions and 15 deletions

View File

@@ -830,19 +830,10 @@ impl MachineState {
}
Addr::Con(h) if self.heap.atom_at(h) => {
if let HeapCellValue::Atom(name, _) = self.heap.clone(h) {
let iter = name.as_str().chars().map(|c| Addr::Char(c));
let list_of_chars = Addr::HeapCell(self.heap.to_list(iter));
let s = self.heap.put_complete_string(name.as_str());
let a2 = self[temp_v!(2)];
match self.store(self.deref(a2)) {
Addr::PStrLocation(..) => {
self.fail = true;
}
a2 => {
self.unify(a2, list_of_chars);
}
}
self.unify(s, a2);
} else {
unreachable!()
}