Skip to content

Commit

Permalink
Merge pull request #130 from timfel/patch-2
Browse files Browse the repository at this point in the history
Support non-standard selectors with colons
Conflicts:

	repository/MonticelloFileTree-Core.package/MCFileTreeStCypressWriter.class/class/fileNameForSelector..st
  • Loading branch information
dalehenrich committed Oct 20, 2014
1 parent 436095b commit bb6f211
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 24 deletions.
@@ -0,0 +1,26 @@
accessing
fileNameForSelector: selector
^ (selector includes: $:)
ifTrue: [
selector
collect: [ :each |
each = $:
ifTrue: [ $. ]
ifFalse: [ each ] ] ]
ifFalse: [
(self specials includes: selector first)
ifFalse: [ selector ]
ifTrue: [
| output specials |
specials := self specials.
output := String new writeStream.
output nextPut: $^.
selector
do: [ :each |
output
nextPutAll:
((specials includes: each)
ifTrue: [ specials at: each ]
ifFalse: [ each asString ]) ]
separatedBy: [ output nextPut: $. ].
output contents ] ]
@@ -1,26 +1,3 @@
private
fileNameForSelector: selector
^ selector last = $:
ifTrue: [
selector
collect: [ :each |
each = $:
ifTrue: [ $. ]
ifFalse: [ each ] ] ]
ifFalse: [
(self class specials includes: selector first)
ifFalse: [ selector ]
ifTrue: [
| output specials |
specials := self class specials.
output := String new writeStream.
output nextPut: $^.
selector
do: [ :each |
output
nextPutAll:
((specials includes: each)
ifTrue: [ specials at: each ]
ifFalse: [ each asString ]) ]
separatedBy: [ output nextPut: $. ].
output contents ] ]
^ self class fileNameForSelector: selector

0 comments on commit bb6f211

Please sign in to comment.