care for maxLineNo when looking for a block-by-lineNo
authorClaus Gittinger <cg@exept.de>
Tue, 14 Jan 1997 16:58:44 +0100
changeset 481 187a88a9695d
parent 480 e4ac7e62ca9a
child 482 b5ca810477a4
care for maxLineNo when looking for a block-by-lineNo
Parser.st
--- a/Parser.st	Sat Jan 11 23:57:21 1997 +0100
+++ b/Parser.st	Tue Jan 14 16:58:44 1997 +0100
@@ -344,6 +344,19 @@
     LineNumberInfo := aBoolean
 ! !
 
+!Parser class methodsFor:'defaults'!
+
+maxLineNumber
+    "return the maximum lineNumber that is possibly
+     encoded in a methods byteCode debugging information.
+     Since lineNumber entries only have 1 byte available,
+     this is 255 for byteCode methods."
+
+    ^ 255
+
+    "Created: 14.2.1997 / 16:52:54 / cg"
+! !
+
 !Parser class methodsFor:'evaluating expressions'!
 
 evaluate:aStringOrStream
@@ -719,7 +732,7 @@
     |compiler tree mSource who mClass blocks 
      maxSoFar innerBlock m|
 
-    line isNil ifTrue:[
+    (line isNil or:[line == self maxLineNumber]) ifTrue:[
         ^ nil
     ].
 
@@ -819,7 +832,7 @@
     ^ innerBlock.
 
     "Created: 11.1.1997 / 23:29:13 / cg"
-    "Modified: 11.1.1997 / 23:35:34 / cg"
+    "Modified: 14.2.1997 / 16:51:25 / cg"
 !
 
 parseExpression:aString
@@ -3968,6 +3981,6 @@
 !Parser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/Parser.st,v 1.122 1997-01-11 22:57:21 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/Parser.st,v 1.123 1997-01-14 15:58:44 cg Exp $'
 ! !
 Parser initialize!