Hi Folks,
For this method, #tokenish and several others, please take a look at senders & implementors of #isGenerallyValidInIdentifiers and #isGenerallyValidStartOfInIdentifiers in Cuis. This style eases having a consistent behavior.
Cheers, Juan Vuletich
Quoting commits@source.squeak.org:
Item was changed: ----- Method: Symbol>>precedence (in category 'accessing') ----- precedence "Answer the receiver's precedence, assuming it is a valid Smalltalk message selector or 0 otherwise. The numbers are 1 for unary, 2 for binary and 3 for keyword selectors."
self size = 0 ifTrue: [^ 0].
- self first isLetter ifFalse: [^ 2]. self last = $: ifTrue: [^ 3].
- (self anySatisfy: [:c | c isLetter]) ifTrue: [^ 1].
- ^ 2!
- ^ 1!
Cheers, Juan Vuletich