<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p>Nice catch!</p>
<p><br>
</p>
<p>Best,</p>
<p>Christoph</p>
<div id="x_Signature">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<div name="x_divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div>
<div class="x__rp_T4" id="x_Item.MessagePartBody">
<div class="x__rp_U4 x_ms-font-weight-regular x_ms-font-color-neutralDark x_rpHighlightAllClass x_rpHighlightBodyClass" id="x_Item.MessageUniqueBody" style="font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont">
<div dir="ltr">
<div id="x_divtagdefaultwrapper"><font face="Calibri,Helvetica,sans-serif,EmojiFont,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols">
<div id="x_Signature">
<div style="margin:0px"><font style="font-family:Calibri,Arial,Helvetica,sans-serif,serif,EmojiFont">
<div><font size="3" color="black"><span style="font-size:12pt"><a href="http://www.hpi.de/" target="_blank" rel="noopener noreferrer" id="LPNoLP"><font size="2"><span id="LPlnk909538"><font color="#757B80"></font></span></font></a></span></font></div>
</font></div>
</div>
</font></div>
</div>
</div>
</div>
</div>
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von commits@source.squeak.org <commits@source.squeak.org><br>
<b>Gesendet:</b> Donnerstag, 11. März 2021 13:50:14<br>
<b>An:</b> squeak-dev@lists.squeakfoundation.org<br>
<b>Betreff:</b> [squeak-dev] The Inbox: Compiler-tobe.455.mcz</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">A new version of Compiler was added to project The Inbox:<br>
<a href="http://source.squeak.org/inbox/Compiler-tobe.455.mcz">http://source.squeak.org/inbox/Compiler-tobe.455.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Compiler-tobe.455<br>
Author: tobe<br>
Time: 11 March 2021, 1:50:12.615385 pm<br>
UUID: ba3e2f61-8c2a-4dcf-a288-f6e81db4eda1<br>
Ancestors: Compiler-codefrau.454<br>
<br>
Fix scanAllTokenPositionsInto: when the text of a comment happened to appear just before it. See testScanTokensRepeatComment for an example.<br>
<br>
=============== Diff against Compiler-codefrau.454 ===============<br>
<br>
Item was changed:<br>
  ----- Method: Scanner>>scanAllTokenPositionsInto: (in category 'expression types') -----<br>
  scanAllTokenPositionsInto: aBlock<br>
         "Evaluate aBlock with the start and end positions of all separate non-white-space tokens, including comments."<br>
  <br>
         | lastMark |<br>
         lastMark := 1.<br>
         [currentComment ifNotNil:<br>
                 [currentComment do:<br>
                         [:cmnt| | idx |<br>
+                         idx := source originalContents findLastOccurrenceOfString: cmnt startingAt: lastMark.<br>
-                         idx := source originalContents indexOfSubCollection: cmnt startingAt: lastMark.<br>
                          (idx > 0 and: [idx < mark]) ifTrue:<br>
                                 [aBlock value: idx - 1 value: (lastMark := idx + cmnt size)]].<br>
                  currentComment := nil].<br>
         mark ifNotNil:<br>
                 [(token == #- <br>
                   and: [(self typeTableAt: hereChar) == #xDigit]) ifTrue:<br>
                         [| savedMark |<br>
                          savedMark := mark.<br>
                          self scanToken.<br>
                          token := token negated.<br>
                          mark := savedMark].<br>
                 "Compensate for the fact that the parser uses two character lookahead.  Normally we must<br>
                   remove the extra two characters.  But this mustn't happen for the last token at the end of stream."<br>
                  aBlock<br>
                         value: mark<br>
                         value: source position - (aheadChar == DoItCharacter<br>
                                 ifTrue: [hereChar == DoItCharacter<br>
                                         ifTrue: [0]<br>
                                         ifFalse: [1]]<br>
                                 ifFalse: [2])].<br>
          (tokenType == #rightParenthesis<br>
           or: [tokenType == #doIt]) ifTrue:<br>
                 [^self].<br>
         tokenType == #leftParenthesis<br>
                 ifTrue: <br>
                         [self scanToken; scanAllTokenPositionsInto: aBlock]<br>
                 ifFalse: <br>
                         [(tokenType == #word or: [tokenType == #keyword or: [tokenType == #colon]])<br>
                                 ifTrue: <br>
                                         [self scanLitWord.<br>
                                          token == #true ifTrue: [token := true].<br>
                                          token == #false ifTrue: [token := false].<br>
                                          token == #nil ifTrue: [token := nil]]<br>
                                 ifFalse:<br>
                                         [(token == #- <br>
                                           and: [(self typeTableAt: hereChar) == #xDigit])<br>
                                                 ifTrue: <br>
                                                         [self scanToken.<br>
                                                          token := token negated]]].<br>
                 self scanToken ] repeat!<br>
<br>
<br>
</div>
</span></font>
</body>
</html>