Skip to content

Instantly share code, notes, and snippets.

@ThierryGoubier
Created June 25, 2015 20:55
Show Gist options
  • Save ThierryGoubier/92b260601ed38740dcd0 to your computer and use it in GitHub Desktop.
Save ThierryGoubier/92b260601ed38740dcd0 to your computer and use it in GitHub Desktop.
Searching to remove StringHolder as superclass of CrLfFileEditor
| selfMessages searcher superMessages |
selfMessages := Set new.
searcher := RBParseTreeSearcher new.
searcher
matches: 'self `@message: ``@args'
do: [ :aNode :answer |
((CrLfFileEditor selectors includes: aNode selector) not and: [ StringHolder selectors includes: aNode selector ])
ifTrue: [ selfMessages add: aNode selector ] ].
CrLfFileEditor methods do: [ :e | searcher executeTree: e parseTree initialAnswer: nil ].
selfMessages inspect.
superMessages := Set new.
searcher := RBParseTreeSearcher new.
searcher
matches: 'super `@message: ``@args'
do: [:aNode :answer | (StringHolder selectors includes: aNode selector) ifTrue: [ superMessages add: aNode selector] ].
CrLfFileEditor methods do: [ :e | searcher executeTree: e parseTree initialAnswer: nil].
superMessages inspect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment