]> Repositorios git - scryer-prolog.git/commitdiff
add Addr::Lis as case in PartialStringTail (#530)
authorMark Thom <[email protected]>
Mon, 18 May 2020 18:27:26 +0000 (12:27 -0600)
committerMark Thom <[email protected]>
Mon, 18 May 2020 18:27:26 +0000 (12:27 -0600)
src/prolog/iterators.rs
src/prolog/machine/system_calls.rs

index 28da88e44e4d33d180c69accbbb6084b114ffc74..55087f549dc8289fbec6e4e4f32a70f3d1706700 100644 (file)
@@ -92,6 +92,10 @@ fn is_partial_string<'a>(
         Term::Constant(_, Constant::EmptyList) => {
             return Some((string, None));
         }
+        Term::Constant(_, Constant::String(tail)) => {
+            string += &tail;
+            return Some((string, None));
+        }
         _ => {
             return None;
         }
index 9554badb18bfb133d6e17479a6ad70f15b3b7412..47b36012a9aeb78919658f3f52d349d9c293a97e 100644 (file)
@@ -1164,6 +1164,9 @@ impl MachineState {
                             return Ok(());
                         }
                     }
+                    Addr::Lis(h) => {
+                        self.unify(Addr::HeapCell(h + 1), self[temp_v!(2)]);
+                    }
                     Addr::EmptyList => {
                         self.fail = true;
                         return Ok(());