[Pharo-project] RBScanner>>#initializeClassificationTable

Levente Uzonyi leves at elte.hu
Thu Nov 25 11:42:56 CET 2010


On Thu, 25 Nov 2010, Henrik Johansen wrote:

>
> On Nov 25, 2010, at 11:12 59AM, Henrik Johansen wrote:
>
>>
>> On Nov 25, 2010, at 10:58 44AM, Benjamin wrote:
>>
>>> Hello guys,
>>>
>>> Is there a reason this method use :
>>>
>>> 	(Scanner isLiteralSymbol: '_')
>>> 		ifTrue: [ self initializeChars: '_' to: #alphabetic ]
>>> 		ifFalse: [ self initializeChars: '_' to: #special ].
>>>
>>> and not
>>>
>>> 	(Scanner allowUnderscoreAsAssignment)
>>> 		ifTrue: [ self initializeChars: '_' to: #special ]
>>> 		ifFalse:[ self initializeChars: '_' to: #alphabetic ]
>>>
>>> ?
>>>
>>>
>>> Cheers,
>>>
>>> Ben
>>
>> Compatibility I would guess.
>> In Squeak, allowUnderscoreAsAssignment is still a Preferences method.
>>
>> Cheers,
>> Henry
>>
>
> P.S. At the very least it could be changed to Scanner isLiteralSymbol: #_

I guess not. There was a bug in Squeak (and probably Pharo too), because 
the compiler replaced #_ to #':=' during compilation. See 
http://bugs.squeak.org/view.php?id=7571 .


Levente

> :)
>
>




More information about the Pharo-project mailing list