class: StatementNode
authorClaus Gittinger <cg@exept.de>
Fri, 15 Mar 2013 21:44:27 +0100
changeset 3044 ea354a9e548c
parent 3043 9a514612b3ea
child 3045 8c1c52abd3cf
class: StatementNode added: #do:
StatementNode.st
--- a/StatementNode.st	Fri Mar 15 21:29:38 2013 +0100
+++ b/StatementNode.st	Fri Mar 15 21:44:27 2013 +0100
@@ -192,6 +192,21 @@
 
 !StatementNode methodsFor:'enumerating'!
 
+do:aBlock
+    "in st/x, statements is a linked list (not an ordered collection),
+     this provides some dialect compatibility (for st2js)"
+
+    | this |
+
+    "/ too stupid: ST/X statements are linked as a list ...
+
+    this := self.
+    [this notNil] whileTrue:[
+        aBlock value:this.
+        this := this nextStatement
+    ].
+!
+
 messagesDo:aBlock
     |s e|
 
@@ -361,9 +376,10 @@
 !StatementNode class methodsFor:'documentation'!
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libcomp/StatementNode.st,v 1.43 2011-09-12 08:19:41 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/StatementNode.st,v 1.44 2013-03-15 20:44:27 cg Exp $'
 !
 
 version_SVN
     ^ '§ Id §'
 ! !
+