The Trunk: ShoutCore-nice.20.mcz

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

The Trunk: ShoutCore-nice.20.mcz

commits-2
Nicolas Cellier uploaded a new version of ShoutCore to project The Trunk:
http://source.squeak.org/trunk/ShoutCore-nice.20.mcz

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

Name: ShoutCore-nice.20
Author: nice
Time: 10 October 2010, 9:11:43.142 pm
UUID: aa301453-f7d9-410b-bdd9-af20058b2433
Ancestors: ShoutCore-laza.19

Let the highlighter parse correctly binary selector with $- at any place, not only at first place.

=============== Diff against ShoutCore-laza.19 ===============

Item was changed:
+ SystemOrganization addCategory: #'ShoutCore-Monticello'!
  SystemOrganization addCategory: #'ShoutCore-Parsing'!
  SystemOrganization addCategory: #'ShoutCore-Styling'!
- SystemOrganization addCategory: #'ShoutCore-Monticello'!

Item was changed:
  ----- Method: SHParserST80>>isBinary (in category 'token testing') -----
  isBinary
  (currentToken isNil or: [self isName or: [self isKeyword]])
  ifTrue: [^false].
  1 to: currentToken size do: [:i | | c |
  c := currentToken at: i.
+ (self isSelectorCharacter: c)
- ((self isSelectorCharacter: c) or: [i = 1 and: [c == $-]])
  ifFalse: [^false]].
  ^true!

Item was changed:
  ----- Method: SHParserST80>>isSelectorCharacter: (in category 'character testing') -----
  isSelectorCharacter: aCharacter
 
  aCharacter isAlphaNumeric ifTrue: [^false].
  aCharacter isSeparator ifTrue:[^false].
+ ('"#$'':().;[]{}^_'  includes: aCharacter)
- "$- is specified here as NOT being a selector char, but it can appear as the
- first char in a binary selector. That case is handled specially elsewhere"
- ('"#$'':().;[]{}^_-'  includes: aCharacter)
  ifTrue:[^false].
  aCharacter asciiValue = 30 ifTrue: [^false "the doIt char"].
  aCharacter asciiValue = 0 ifTrue: [^false].
  "Any other char is ok as a binary selector char."
  ^true
  !