DoWhatIMeanSupport.st
changeset 4775 66a822518725
parent 4764 3142fc3b57cd
child 4780 ac7e1d23c65b
--- a/DoWhatIMeanSupport.st	Sat May 23 03:48:03 2015 +0000
+++ b/DoWhatIMeanSupport.st	Sat May 23 14:48:54 2015 +0200
@@ -3275,41 +3275,44 @@
     RBParser isNil ifTrue: [^ nil].
 
     source = LastSource ifTrue:[
-	tree := LastParseTree.
+        tree := LastParseTree.
     ] ifFalse:[
-	tree := RBParser
-		parseMethod:source
-		onError:
-		    [:str :err ":nodesSoFar" |
-			"Transcript showCR:'Parse-Error: ',str."
-			nil
-		    ].
-
-	tree isNil ifTrue:[
-	    "/ try to parse as an expression
-	    tree := RBParser
-		    parseExpression:source
-		    onError:
-			[:str :err ":nodesSoFar" |
-			    "Transcript showCR:'Parse-Error: ',str."
-			    nil
-			].
-
-	    tree isNil ifTrue:[
-		^ nil
-	    ].
-	].
-
-	LastSource := source.
-	LastParseTree := tree.
+        tree := RBParser
+                parseMethod:source
+                onError:
+                    [:str :err ":nodesSoFar" |
+                        "Transcript showCR:'Parse-Error: ',str."
+                        nil
+                    ].
+
+        tree isNil ifTrue:[
+            "/ try to parse as an expression
+            tree := RBParser
+                    parseExpression:source
+                    onError:
+                        [:str :err ":nodesSoFar" |
+                            "Transcript showCR:'Parse-Error: ',str."
+                            nil
+                        ].
+
+            tree isNil ifTrue:[
+                ^ nil
+            ].
+        ].
+
+        LastSource := source.
+        LastParseTree := tree.
     ].
 
-    node := tree whichNodeIsContainedBy:interval.
+    Error handle:[:ex |
+    ] do:[ 
+        node := tree whichNodeIsContainedBy:interval.
+    ].
     node isNil ifTrue: [
-	node := tree bestNodeFor: interval.
-	node isNil ifTrue: [
-	    node := self findNodeIn:tree forInterval:interval
-	].
+        node := tree bestNodeFor: interval.
+        node isNil ifTrue: [
+            node := self findNodeIn:tree forInterval:interval
+        ].
     ].
     ^ node
 
@@ -4771,10 +4774,10 @@
 !DoWhatIMeanSupport class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/DoWhatIMeanSupport.st,v 1.222 2015-05-11 20:25:24 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/DoWhatIMeanSupport.st,v 1.223 2015-05-23 12:48:54 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libwidg2/DoWhatIMeanSupport.st,v 1.222 2015-05-11 20:25:24 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/DoWhatIMeanSupport.st,v 1.223 2015-05-23 12:48:54 cg Exp $'
 ! !