[squeak-dev] Underscore selectors
Levente Uzonyi
leves at elte.hu
Mon Aug 13 20:49:52 UTC 2012
On Mon, 13 Aug 2012, Colin Putney wrote:
> Hi all,
>
> I'd like to have the preference to allow underscore selectors working
> in 4.4. To do that, we'll need to fix Character>>tokenish to honor the
> preference, ideally without degrading the performance of fileIn and
> package loading. I don't remember all the issues that came up when the
> preference was introduced, though. Is there anything else that needs
> to be done?
I started to collect the todos here:
http://lists.squeakfoundation.org/pipermail/squeak-dev/2012-July/164980.html
One more thing that needs to be done is to implement a small tool, which
can convert code with underscore assignments to ansi assignments. I have a
prototype, but it's not fully working due to a bug in Scanner >>
#scanTokenPositionsIn:into:. Here's a snippet that demonstrates the issue:
Array streamContents: [ :stream |
| source scanner |
source := 'x := 1. x := 2'.
scanner := Scanner new.
scanner scanTokenPositionsIn: source into: [ :start :end |
stream nextPut: { start. end. source copyFrom: start to: end. scanner instVarNamed: #tokenType } ] ]
The first assignment x := 1 is tokenized properly to #word, #leftArrow and
#number, but the second one is not. The last 2 tokens are combined into a
#doIt, so the code cannot find fix last assignment in a method.
Levente
>
> Colin
>
>
More information about the Squeak-dev
mailing list
|