[squeak-dev] The Trunk: Collections-mt.1014.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed Jun 22 13:07:42 UTC 2022
Marcel Taeumel uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-mt.1014.mcz
==================== Summary ====================
Name: Collections-mt.1014
Author: mt
Time: 22 June 2022, 3:07:39.450264 pm
UUID: 0b2c5044-f005-7844-8bf5-01303e6cc781
Ancestors: Collections-mt.1013, Collections-kfr.1011
Merge Collections-kfr.1011.
=============== Diff against Collections-mt.1013 ===============
Item was changed:
----- Method: TextLink>>validate: (in category 'initialize-release') -----
validate: specString
"Can this string be decoded to be Class space Method (or Comment, Definition, Hierarchy)? If so, return it in valid format, else nil"
| list first mid last |
list := specString findTokens: ' .|'.
list isEmpty ifTrue: [ ^nil ].
last := list last.
last first isUppercase ifTrue: [
+ (#('Comment' 'Definition' 'Hierarchy' 'Help') includes: last) ifFalse: [^ nil].
- (#('Comment' 'Definition' 'Hierarchy') includes: last) ifFalse: [^ nil].
"Check for 'Rectangle Comment Comment' and remove last one"
(list at: list size - 1 ifAbsent: [^nil]) = last ifTrue: [list := list allButLast]].
list size > 3 ifTrue: [^ nil].
list size < 2 ifTrue: [^ nil].
first := Symbol lookup: list first.
first ifNil: [^ nil].
Smalltalk at: first ifAbsent: [^ nil].
mid := list size = 3
ifTrue: [(list at: 2) = 'class' ifTrue: ['class '] ifFalse: [^ nil]]
ifFalse: [''].
"OK if method name is not interned -- may not be defined yet"
^ first, ' ', mid, last!
More information about the Squeak-dev
mailing list
|