[SCM] Lisaac compiler branch, master, updated. lisaac-0.12-700-g8b25e7b

Mildred Ki'Lya silkensedai at online.fr
Thu Apr 7 14:35:05 UTC 2011


The following commit has been merged in the master branch:
commit 8b25e7b5258e183099914606cea6a74d61f7ff72
Author: Mildred Ki'Lya <silkensedai at online.fr>
Date:   Thu Apr 7 16:34:22 2011 +0200

    fix ITERATOR

diff --git a/lib/standard/collection/iterator.li b/lib/standard/collection/iterator.li
index 9bbd279..6db98af 100644
--- a/lib/standard/collection/iterator.li
+++ b/lib/standard/collection/iterator.li
@@ -85,7 +85,6 @@ Section Public
   [
     -? {inc != 0};
     -? {t != NULL};
-    -? {t.valid_index i};
   ]
   (
     increment := inc;
@@ -96,7 +95,7 @@ Section Public
 
   - make t:TRAVERSABLE(V) index i:INTEGER :SELF <-
   (
-    make t index i increment 1;
+    make t index i increment 1
   );
 
   //
@@ -110,6 +109,8 @@ Section Public
   - valid_next :BOOLEAN <- valid_relative (+increment);
   - valid_prev :BOOLEAN <- valid_relative (-increment);
   - valid_previous :BOOLEAN <- valid_prev;
+  - first :BOOLEAN <- ! valid_prev;
+  - last  :BOOLEAN <- ! valid_next;
 
   //
   // Move:
@@ -178,7 +179,8 @@ Section Public
     ? { ! valid };
   ];
 
-  - iterate b:{} <- { valid }.while_do { b.value; next; };
 
-  - iterate_v b:{V;} <- { valid }.while_do { b.value get; next; };
+  - loop b:{} <- { valid }.while_do { b.value; next; };
+
+  - loop_v b:{V;} <- { valid }.while_do { b.value get; next; };
 

-- 
Lisaac compiler



More information about the Lisaac-commits mailing list