[Cuis-dev] Fix: a number that is the last character of a method now gets its exact range

Hernán Wilkinson hernan.wilkinson at 10pines.com
Thu Nov 19 10:47:22 PST 2026


Hi,

 Attached is a fix for when the range of a number that is the last
character of a method is requested. The scanner marks any token that starts
on the last character of the source one character early and I fised this
for variables a long ago in Parser>>variable; but numbers had no correction.
   Parser>>literalExpression now corrects the range through
rangeOfLiteral:scannedAt:. I used the same approach in variable instead of
changing the scanner’s mark, because Parser>>expected: compensates for that
mark when it places syntax error messages.
  It includes compiler tests and changes in refactoring tests.
  The Parser has the same bug with a one-character unary selector at the
very end (^self x), I soon will send the fix.

Cheers!
Hernan.


-- 

*Hernán WilkinsonAgile Software Development, Teaching & Coaching*
*Phone: +54-011*-4893-2057
*Twitter: @HernanWilkinson*
*site: http://www.10Pines.com <http://www.10pines.com/>*
Address: Alem 896, Floor 6, Buenos Aires, Argentina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20261119/bcdbb604/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: UnsavedChangesTo-CompilerTests-HAW.003.cs.st
Type: application/octet-stream
Size: 818 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20261119/bcdbb604/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 8343-LastCharacterOfMethodRange-HernanWilkinson-2026Nov17-22h15m-HAW.001.cs.st
Type: application/octet-stream
Size: 1127 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20261119/bcdbb604/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: UnsavedChangesTo-RefactoringTests-HAW.036.cs.st
Type: application/octet-stream
Size: 4677 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20261119/bcdbb604/attachment-0005.obj>


More information about the Cuis-dev mailing list