[squeak-dev] The Trunk: Traits-nice.249.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Dec 25 20:01:01 UTC 2009

Nicolas Cellier uploaded a new version of Traits to project The Trunk:

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

Name: Traits-nice.249
Author: nice
Time: 25 December 2009, 9:00:46 am
UUID: 79b2d65b-4334-45c3-8714-ce0e0daa4235
Ancestors: Traits-nice.248

fix #formalParametersAt: where due in Traits...
Implemented thanks to new support method in Parser

Note: this method has no senders in trunk.
I suspect it does not have much value...
I presume it could have been used by refactoring tools, but RB must be using its own parser...
Anyone knows of a package using #formalParametersAt: ?

=============== Diff against Traits-nice.248 ===============

Item was changed:
  ----- Method: TPureBehavior>>formalParametersAt: (in category 'accessing method dictionary') -----
  formalParametersAt: aSelector
  	"Return the names of the arguments used in this method."
+ 	| source |
- 	| source parser message list params |
  	source := self sourceCodeAt: aSelector ifAbsent: [^ #()].	"for now"
+ 	^(self parserClass new) parseParameterNames: source!
- 	(parser := self parserClass new) parseSelector: source.
- 	message := source copyFrom: 1 to: (parser endOfLastToken min: source size).
- 	list := message string findTokens: Character separators.
- 	params := OrderedCollection new.
- 	list withIndexDo: [:token :ind | ind even ifTrue: [params addLast: token]].
- 	^ params!

More information about the Squeak-dev mailing list