[squeak-dev] Re: Can i has underscores? :)

Igor Stasenko siguctua at gmail.com
Thu Apr 15 10:51:02 UTC 2010

Oops, that was a bit buggy :)

This is an updated one, merged with Andreas.

It works fine with this:

Smalltalk allClasses do:[:cls|
 cls selectorsAndMethodsDo:[:sel :method|
   | source filtered node compiled |
   source := (cls sourceCodeAt: sel) asString.
   (source indexOf: $_) > 0 ifTrue:[
     filtered := (UnderscoreFilter on: source readStream)
       replacement: ':='; upToEnd.
     source = filtered ifFalse:[
       Transcript cr; show: cls name, '>>', sel.
       node := cls compilerClass new compile: filtered
         in: cls classified: nil notifying: nil ifFail: nil..
       compiled := node generate: method trailer.
       self assert: (method equivalentTo: compiled).
] displayingProgress:[:cls| 'Verifying ', cls name].

Best regards,
Igor Stasenko AKA sig.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: System-FileIn.st
Type: application/octet-stream
Size: 14350 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20100415/3b50be4c/System-FileIn.obj

More information about the Squeak-dev mailing list