#BUGFIX by exept
class: StatementNode
added:
#allMessageSelectorsDo:
#allMessagesDo:
changed:
#messageSelectorsDo:
#messagesDo:
--- a/StatementNode.st Tue Oct 01 10:19:11 2019 +0200
+++ b/StatementNode.st Mon Oct 07 18:16:38 2019 +0200
@@ -196,6 +196,30 @@
!StatementNode methodsFor:'enumerating'!
+allMessageSelectorsDo:aBlock
+ "evaluate aBlock for each message-selector sent by this statement and all followup statements"
+
+ |s|
+
+ s := self.
+ [s notNil] whileTrue:[
+ s messageSelectorsDo:aBlock.
+ s := s nextStatement
+ ].
+!
+
+allMessagesDo:aBlock
+ "evaluate aBlock for each message-node sent by this statement and all followup statements"
+
+ |s|
+
+ s := self.
+ [s notNil] whileTrue:[
+ s messagesDo:aBlock.
+ s := s nextStatement
+ ].
+!
+
allNodesDo:aBlock
"evaluate aBlock for each node in this node and subnodes"
@@ -244,25 +268,17 @@
|s e|
- s := self.
- [s notNil] whileTrue:[
- e := s expression.
- e notNil ifTrue:[e messageSelectorsDo:aBlock].
- s := s nextStatement
- ].
+ e := self expression.
+ e notNil ifTrue:[e messageSelectorsDo:aBlock].
!
messagesDo:aBlock
"evaluate aBlock for each message-node sent by this node and subnodes"
- |s e|
+ |e|
- s := self.
- [s notNil] whileTrue:[
- e := s expression.
- e notNil ifTrue:[e messagesDo:aBlock].
- s := s nextStatement
- ].
+ e := self expression.
+ e notNil ifTrue:[e messagesDo:aBlock].
!
nodeDo:anEnumerator