[squeak-dev] Can i has underscores? :)
siguctua at gmail.com
Thu Apr 15 11:34:09 UTC 2010
On 14 April 2010 20:10, Juan Vuletich <juan at jvuletich.org> wrote:
> Alexander Lazarević wrote:
>> After setting the "Allow underscore selectors" preference to true in
>> 4.1.1 I just created a class MyClass with the method foo_bar and
>> MyClass new foo_bar returns 10?!
>> I can't say why the note about the new sources file pops up on this
> Hi Folks,
> I recently integrated Andreas' last changes to Cuis. Today I tried Igor's
> example and found a few problems, that the attached changes address. This
> stuff was done for Cuis, but should be easy to integrate in Squeak (and I
> guess Pharo too). Everybody feel free to integrate and test.
> 0489-ConfigurableUnderscoreShoutSupport-jmv.5.cs - Adds Shout support for
> #allowUnderscoreAssignments and #allowUnderscoreSelectos preference
> 0490-ConfigurableUnderscoreFixes-jmv.3.cs - Fixes some issues when parsing
> underscores in identifiers in .cs files. Does so by simplifying Scanner.
> Also makes #a_b to print correctly. With these fixes, such weird stuff as
> TestUnderscores.cs can be parser and installed.
> 0491-ConfigurableUnderscoreElsewhere-jmv.1.cs Fixes senders of #isLetter and
> #isAlphaNumeric that should also consider underscores.
Juan, i tried to file-in your changesets into a Squeak and got some errors:
- classDefinition: #Scanner category: #'Compiler-Kernel'
is not a valid smalltalk expression
next i tried to install things selectively and stumbled upon:
in debugger, somehow an encoder ivar holds an instance of Parser:
"Query class + preference"
^encoder classEncoding allowUnderscoreAssignments
my guess this is because of reshaping the Scanner class, which leads
to a mess in existing Parser
So, i think for a correct filein, it should create a separate
NewScanner and NewParser classes,
file them in, and only then , atomically rename them to Scanner and Parser.
> Juan Vuletich
Igor Stasenko AKA sig.
More information about the Squeak-dev