--- a/StatementNode.st Thu Apr 19 17:45:39 2018 +0200
+++ b/StatementNode.st Mon Apr 23 22:17:22 2018 +0200
@@ -198,20 +198,25 @@
allNodesDo:aBlock
"evaluate aBlock for each node in this node and subnodes"
- |s e|
+ |s|
s := self.
[s notNil] whileTrue:[
aBlock value:s.
-"/ s ~~ self ifTrue:[
-"/ s allNodesDo:aBlock.
-"/ ].
- e := s expression.
- e notNil ifTrue:[e allNodesDo:aBlock].
+ s allSubNodesDo:aBlock.
s := s nextStatement
].
!
+allSubNodesDo:aBlock
+ "evaluate aBlock for each subnodes"
+
+ |e|
+
+ e := self expression.
+ e notNil ifTrue:[e allNodesDo:aBlock].
+!
+
do:aBlock
"in st/x, statements is a linked list (not an ordered collection),
this provides some dialect compatibility (for st2js)"