nitcc_rt: make the depth visitor lazy
authorJean Privat <jean@pryen.org>
Fri, 4 Dec 2015 13:54:09 +0000 (08:54 -0500)
committerJean Privat <jean@pryen.org>
Fri, 4 Dec 2015 13:54:09 +0000 (08:54 -0500)
Signed-off-by: Jean Privat <jean@pryen.org>

lib/nitcc_runtime.nit

index d74e246..a85b22b 100644 (file)
@@ -343,7 +343,7 @@ abstract class Node
        fun children: SequenceRead[nullable Node] is abstract
 
        # A point of view of a depth-first visit of all non-null children
-       var depth: Collection[Node] = new DephCollection(self)
+       var depth: Collection[Node] = new DephCollection(self) is lazy
 
        # Visit all the children of the node with the visitor `v`
        protected fun visit_children(v: Visitor)