handle corrupt expression (nil) in statement
authorClaus Gittinger <cg@exept.de>
Sun, 20 Apr 1997 12:14:00 +0200
changeset 511 c144804051db
parent 510 9f19de0f8f0b
child 512 fed48886aff9
handle corrupt expression (nil) in statement
StatNode.st
StatementNode.st
--- a/StatNode.st	Wed Apr 16 19:14:36 1997 +0200
+++ b/StatNode.st	Sun Apr 20 12:14:00 1997 +0200
@@ -158,15 +158,19 @@
 !StatementNode methodsFor:'queries'!
 
 collectBlocksInto:aCollection
-    |this|
+    |this ex|
 
     this := self.
     [this notNil] whileTrue:[
-        this expression collectBlocksInto:aCollection.
+        ex := this expression.
+        ex notNil ifTrue:[
+            ex collectBlocksInto:aCollection.
+        ].
         this := this nextStatement
     ].
 
     "Created: 23.10.1996 / 15:44:13 / cg"
+    "Modified: 20.4.1997 / 12:10:18 / cg"
 !
 
 isConstant
@@ -191,5 +195,5 @@
 !StatementNode class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/Attic/StatNode.st,v 1.17 1996-10-23 15:30:26 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/Attic/StatNode.st,v 1.18 1997-04-20 10:14:00 cg Exp $'
 ! !
--- a/StatementNode.st	Wed Apr 16 19:14:36 1997 +0200
+++ b/StatementNode.st	Sun Apr 20 12:14:00 1997 +0200
@@ -158,15 +158,19 @@
 !StatementNode methodsFor:'queries'!
 
 collectBlocksInto:aCollection
-    |this|
+    |this ex|
 
     this := self.
     [this notNil] whileTrue:[
-        this expression collectBlocksInto:aCollection.
+        ex := this expression.
+        ex notNil ifTrue:[
+            ex collectBlocksInto:aCollection.
+        ].
         this := this nextStatement
     ].
 
     "Created: 23.10.1996 / 15:44:13 / cg"
+    "Modified: 20.4.1997 / 12:10:18 / cg"
 !
 
 isConstant
@@ -191,5 +195,5 @@
 !StatementNode class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/StatementNode.st,v 1.17 1996-10-23 15:30:26 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/StatementNode.st,v 1.18 1997-04-20 10:14:00 cg Exp $'
 ! !