The Trunk: ShoutCore-laza.19.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: ShoutCore-laza.19.mcz

commits-2
Alexander Lazarević uploaded a new version of ShoutCore to project The Trunk:
http://source.squeak.org/trunk/ShoutCore-laza.19.mcz

==================== Summary ====================

Name: ShoutCore-laza.19
Author: laza
Time: 29 April 2010, 4:30:33.725 pm
UUID: 93422ad0-5dad-453c-afd4-5bd9f0441432
Ancestors: ShoutCore-ul.18

Make Shout display symbols with underscores correctly if allowUnderscoreSelectors is true

=============== Diff against ShoutCore-ul.18 ===============

Item was changed:
  ----- Method: SHParserST80>>parseSymbolIdentifier (in category 'parse') -----
  parseSymbolIdentifier
  | c start end |
  c := self currentChar.
+ self failUnless: (c isLetter or: [c == $: or: [c == $_ and: [self allowUnderscoreSelectors]]]).
- self failUnless: (c isLetter or: [c == $:]).
  start := sourcePosition.
  [c := self nextChar.
+ c isAlphaNumeric or: [c == $: or: [c == $_ and: [self allowUnderscoreSelectors]]]] whileTrue.
- c isAlphaNumeric or: [c == $:]]
- whileTrue: [].
  end := sourcePosition - 1.
  c := source copyFrom: start - 1 to: end.
  self scanPast: #symbol start: start - 1 end: end.
  ^c!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: ShoutCore-laza.19.mcz

Hannes Hirzel
Alexander

Great, that you implement the option of having under scores in the selectors.

--Hannes

On Thu, 29 Apr 2010 14:30:48.164 0000, [hidden email]
<[hidden email]> wrote:

> Alexander Lazarevi&#263; uploaded a new version of ShoutCore to project The
> Trunk:
> http://source.squeak.org/trunk/ShoutCore-laza.19.mcz
>
> ==================== Summary ====================
>
> Name: ShoutCore-laza.19
> Author: laza
> Time: 29 April 2010, 4:30:33.725 pm
> UUID: 93422ad0-5dad-453c-afd4-5bd9f0441432
> Ancestors: ShoutCore-ul.18
>
> Make Shout display symbols with underscores correctly if
> allowUnderscoreSelectors is true
>
> =============== Diff against ShoutCore-ul.18 ===============
>
> Item was changed:
>   ----- Method: SHParserST80>>parseSymbolIdentifier (in category 'parse')
> -----
>   parseSymbolIdentifier
>   | c start end |
>   c := self currentChar.
> + self failUnless: (c isLetter or: [c == $: or: [c == $_ and: [self
> allowUnderscoreSelectors]]]).
> - self failUnless: (c isLetter or: [c == $:]).
>   start := sourcePosition.
>   [c := self nextChar.
> + c isAlphaNumeric or: [c == $: or: [c == $_ and: [self
> allowUnderscoreSelectors]]]] whileTrue.
> - c isAlphaNumeric or: [c == $:]]
> - whileTrue: [].
>   end := sourcePosition - 1.
>   c := source copyFrom: start - 1 to: end.
>   self scanPast: #symbol start: start - 1 end: end.
>   ^c!
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: ShoutCore-laza.19.mcz

laza
Hi Hannes!

Thanks, but I didn't do that. :)
I just tried to persuade Shout to display the sourcecode
appropriately, when underscores in selectors are allowed.

Alex

2010/4/29 Hannes Hirzel <[hidden email]>:

> Alexander
>
> Great, that you implement the option of having under scores in the selectors.
>
> --Hannes
>
> On Thu, 29 Apr 2010 14:30:48.164 0000, [hidden email]
> <[hidden email]> wrote:
>> Alexander Lazarevi&#263; uploaded a new version of ShoutCore to project The
>> Trunk:
>> http://source.squeak.org/trunk/ShoutCore-laza.19.mcz
>>
>> ==================== Summary ====================
>>
>> Name: ShoutCore-laza.19
>> Author: laza
>> Time: 29 April 2010, 4:30:33.725 pm
>> UUID: 93422ad0-5dad-453c-afd4-5bd9f0441432
>> Ancestors: ShoutCore-ul.18
>>
>> Make Shout display symbols with underscores correctly if
>> allowUnderscoreSelectors is true
>>
>> =============== Diff against ShoutCore-ul.18 ===============
>>
>> Item was changed:
>>   ----- Method: SHParserST80>>parseSymbolIdentifier (in category 'parse')
>> -----
>>   parseSymbolIdentifier
>>       | c start end |
>>       c := self currentChar.
>> +     self failUnless: (c isLetter or: [c == $: or: [c == $_ and: [self
>> allowUnderscoreSelectors]]]).
>> -     self failUnless: (c isLetter or: [c == $:]).
>>       start := sourcePosition.
>>       [c := self nextChar.
>> +     c isAlphaNumeric or: [c == $: or: [c == $_ and: [self
>> allowUnderscoreSelectors]]]] whileTrue.
>> -     c isAlphaNumeric or: [c == $:]]
>> -             whileTrue: [].
>>       end := sourcePosition - 1.
>>       c := source copyFrom: start - 1 to: end.
>>       self scanPast: #symbol start: start - 1 end: end.
>>       ^c!
>>
>>
>>
>
>