lib/standard/ropes: Adapted output to Ropes.
authorLucas Bajolet <r4pass@hotmail.com>
Thu, 5 Jun 2014 14:40:29 +0000 (10:40 -0400)
committerLucas Bajolet <r4pass@hotmail.com>
Thu, 5 Jun 2014 18:17:07 +0000 (14:17 -0400)
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

lib/standard/ropes.nit

index 33d02ee..a2b010d 100644 (file)
@@ -126,6 +126,13 @@ abstract class Rope
        # Iterator on the substrings, starting at position `from`, in forward order
        fun substrings_from(from: Int): IndexedIterator[Text] do return new SubstringsIterator(self, from)
 
+       redef fun output
+       do
+               for i in substrings do
+                       i.output
+               end
+       end
+
        redef fun to_cstring
        do
                if str_representation != null then return str_representation.as(not null)