The Trunk: Collections-mt.866.mcz

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

The Trunk: Collections-mt.866.mcz

Marcel Taeumel uploaded a new version of Collections to project The Trunk:

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

Name: Collections-mt.866
Author: mt
Time: 3 December 2019, 2:05:26.496677 pm
UUID: d4ee3e01-f703-8b47-88e2-5c3d52dbaf11
Ancestors: Collections-cmm.865

Complements Morphic-mt.1598 to bring all those find*-parsing methods together. We might want to put it into an extension category? Maybe "*Tools-converting"?

=============== Diff against Collections-cmm.865 ===============

Item was added:
+ ----- Method: String>>findLiteral (in category 'converting') -----
+ findLiteral
+ "Scan the receiver for tokens that represent Smalltalk code literals. Return the first token or nil if non were found."
+ | tokens |
+ tokens := Scanner new typedScanTokens: self.
+ ^tokens isEmpty ifFalse: [tokens first]!

Item was added:
+ ----- Method: String>>findSymbol (in category 'converting') -----
+ findSymbol
+ "Return the currently selected symbol, or nil if none.  Spaces, tabs and returns are ignored. Note that we do never return the empty symbol."
+ | aString |
+ aString := self copyWithoutAll: CharacterSet separators.
+ aString size = 0 ifTrue: [^ nil].
+ ^ Symbol lookup: aString!