ParseNode.st
changeset 4534 cc486485b1ae
parent 4524 111b3e240d4a
child 4541 d4ee14f08875
--- a/ParseNode.st	Tue Aug 27 10:30:54 2019 +0200
+++ b/ParseNode.st	Tue Aug 27 15:09:23 2019 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
@@ -57,6 +55,18 @@
 
 !ParseNode methodsFor:'RBParser compatibility'!
 
+bestNodeFor: anInterval 
+    (self intersectsInterval: anInterval) ifFalse: [^nil].
+    (self containedBy: anInterval) ifTrue: [^self].
+
+    self childrenDo:[:each | 
+        | node |
+        node := each bestNodeFor: anInterval.
+        node notNil ifTrue: [^node]
+    ].
+    ^ nil
+!
+
 children
     |children|