forked from pharo-contributions/mutalk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMTRemoveCaretOperator.class.st
39 lines (30 loc) · 1017 Bytes
/
MTRemoveCaretOperator.class.st
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Class {
#name : 'MTRemoveCaretOperator',
#superclass : 'MTParseRewriterMutantOperator',
#category : 'MuTalk-Model-Operators - Deletion',
#package : 'MuTalk-Model',
#tag : 'Operators - Deletion'
}
{ #category : 'printing' }
MTRemoveCaretOperator >> description [
^'Remove ^'
]
{ #category : 'applying' }
MTRemoveCaretOperator >> expressionToReplace [
^'^``@object'
]
{ #category : 'applying' }
MTRemoveCaretOperator >> newExpression [
^'``@object'
]
{ #category : 'suggestions' }
MTRemoveCaretOperator >> suggestionFor: aMutation using: aMutantKillingSuggestionGenerator [
^aMutantKillingSuggestionGenerator suggestionForMutationProducedByARemoveCaretOperator: aMutation.
]
{ #category : 'applying' }
MTRemoveCaretOperator >> timesToApplyIn: aCompiledMethod with: aParseTree [
"ignore methods that contain only ^self"
(aParseTree statements asArray = { RBParseTreeSearcher treeMatching: '^ self' in: aParseTree })
ifTrue: [ ^ 0 ].
^ super timesToApplyIn: aCompiledMethod with: aParseTree
]