class: ByteCodeCompilerWithBreakpointSupport
authorClaus Gittinger <cg@exept.de>
Thu, 20 Jun 2013 19:12:56 +0200
changeset 3198 47a691bea790
parent 3197 fe2be038af11
child 3199 0c12b1eefc58
class: ByteCodeCompilerWithBreakpointSupport added: #returnStatement changed: #possiblyWrapABreakPointAround: wrong lineNr in breakpoints.
ByteCodeCompilerWithBreakpointSupport.st
--- a/ByteCodeCompilerWithBreakpointSupport.st	Thu Jun 20 19:00:05 2013 +0200
+++ b/ByteCodeCompilerWithBreakpointSupport.st	Thu Jun 20 19:12:56 2013 +0200
@@ -57,9 +57,10 @@
 possiblyWrapABreakPointAround:aBlock
     "refactored Jan's original code; changed to not wrap an already wrapped expression"
 
-    | expr bpnt pos |
+    | expr bpnt pos tokenLineNrBefore |
 
     pos := tokenPosition ? source position.
+    tokenLineNrBefore := tokenLineNr.
 
     [
         breakpoints notEmpty
@@ -79,7 +80,7 @@
     ^ BreakpointNode new
         breakpoint: bpnt;
         expression: expr;
-        lineNumber:(bpnt line ? tokenLineNr);
+        lineNumber:(bpnt line ? tokenLineNrBefore);
         yourself
 
     "Created: / 05-07-2011 / 21:11:19 / cg"
@@ -172,9 +173,10 @@
 !ByteCodeCompilerWithBreakpointSupport class methodsFor:'documentation'!
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libcomp/ByteCodeCompilerWithBreakpointSupport.st,v 1.4 2012-01-27 13:19:41 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/ByteCodeCompilerWithBreakpointSupport.st,v 1.5 2013-06-20 17:12:56 cg Exp $'
 !
 
 version_SVN
-    ^ '§ Id §'
+    ^ '$ Id $'
 ! !
+