Skip to content

Commit

Permalink
added default rules folder
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanmontt committed Nov 9, 2021
1 parent 404c14d commit ab0fa02
Show file tree
Hide file tree
Showing 12 changed files with 11 additions and 0 deletions.
Binary file added default-rewrite-rules/.DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions default-rewrite-rules/RTRemoveAssigmentWithoutEffect.ston
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
RTRuleHolder{#inputCode:'',#outputCode:'',#lhs:'`var := `var',#rhs:'',#isForMethod:false,#isDemoRule:false,#name:'RTRemoveAssigmentWithoutEffect'}ect'}
1 change: 1 addition & 0 deletions default-rewrite-rules/RTRemoveEqualsInAssert.ston
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
RTRuleHolder{#inputCode:'',#outputCode:'',#lhs:'`@receiver assert: `@arg equals: true',#rhs:'`@receiver assert: `@arg',#isForMethod:false,#isDemoRule:false,#name:'RTRemoveEqualsInAssert'}ert'}
1 change: 1 addition & 0 deletions default-rewrite-rules/RTRemoveIfNil.ston
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
RTRuleHolder{#inputCode:'',#outputCode:'',#lhs:'`@receiver ifNil: [ nil ] ifNotNil: `@arg',#rhs:'`@receiver ifNotNil: `@arg',#isForMethod:false,#isDemoRule:false,#name:'RTRemoveIfNil'}Nil'}
1 change: 1 addition & 0 deletions default-rewrite-rules/RTReplaceAssertToAssertEmpty.ston
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
RTRuleHolder{#inputCode:'',#outputCode:'',#lhs:'`@receiver assert: `@arg isEmpty',#rhs:'`@receiver assertEmpty: `@arg',#isForMethod:false,#isDemoRule:false,#name:'RTReplaceAssertToAssertEmpty'}pty'}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
RTRuleHolder{#inputCode:'',#outputCode:'',#lhs:'Character tab asString',#rhs:'String tab',#isForMethod:false,#isDemoRule:false,#name:'RTReplaceCharacterTabWithStringTab'}Tab'}
1 change: 1 addition & 0 deletions default-rewrite-rules/RTReplaceCollectWithFlatCollect.ston
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
RTRuleHolder{#inputCode:'(RBBrowserEnvironment default packages collect: #classes) flattened',#outputCode:'RBBrowserEnvironment default packages flatCollect: #classes',#lhs:'(`@receiver collect: `@arg) flattened',#rhs:'`@receiver flatCollect: `@arg',#isForMethod:false,#isDemoRule:false,#name:'RTReplaceCollectWithFlatCollect'}ect'}
1 change: 1 addition & 0 deletions default-rewrite-rules/RTReplaceDenyToDenyEmpty.ston
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
RTRuleHolder{#inputCode:'',#outputCode:'',#lhs:'`@receiver deny: `@arg isEmpty',#rhs:'`@receiver denyEmpty: `@arg',#isForMethod:false,#isDemoRule:false,#name:'RTReplaceDenyToDenyEmpty'}pty'}
1 change: 1 addition & 0 deletions default-rewrite-rules/RTReplaceSelectToReject.ston
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
RTRuleHolder{#inputCode:'RBPackageEnvironment new packages select: [ :aPackage | \r\t(aPackage includesSubstring: \'Collection\') not ]',#outputCode:'RBPackageEnvironment new packages reject: [ :aPackage | \r\taPackage includesSubstring: \'Collection\' ]',#lhs:'`@receiver select: [ :`each | \r\t| `@temps |\r\t``@.Statements.\r\t``@object not ]',#rhs:'`@receiver reject: [ :`each | \r\t| `@temps |\r\t``@.Statements.\r\t``@object ]',#isForMethod:false,#isDemoRule:false,#name:'RTReplaceSelectToReject'}ect'}
1 change: 1 addition & 0 deletions default-rewrite-rules/RTSimplifyConditionalToIsEmpty.ston
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
RTRuleHolder{#inputCode:'',#outputCode:'',#lhs:'`@receiver ifEmpty: [ true ] ifNotEmpty: [ false ]',#rhs:'`@receiver isEmpty',#isForMethod:false,#isDemoRule:false,#name:'RTSimplifyConditionalToIsEmpty'}pty'}
1 change: 1 addition & 0 deletions default-rewrite-rules/RTSimplifyToIfEmptyIfNotEmpty.ston
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
RTRuleHolder{#inputCode:'',#outputCode:'',#lhs:'`@receiver isEmpty ifTrue: `@arg ifFalse: `@arg2',#rhs:'`@receiver ifEmpty: `@arg ifNotEmpty: `@arg2',#isForMethod:false,#isDemoRule:false,#name:'RTSimplifyToIfEmptyIfNotEmpty'}pty'}
1 change: 1 addition & 0 deletions default-rewrite-rules/RTSimplifyToIfNilIfNotNil.ston
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
RTRuleHolder{#inputCode:'aCollection isNil\r\tifTrue: [ aCollection := OrderedCollection new ]\r\tifFalse: [ aCollection select: #isDigit ]',#outputCode:'aCollection\r\tifNil: [ aCollection := OrderedCollection new ]\r\tifNotNil: [ aCollection select: #isDigit ]',#lhs:'`@receiver isNil\r\tifTrue: `@arg\r\tifFalse: `@arg2',#rhs:'`@receiver ifNil: `@arg ifNotNil: `@arg2',#isForMethod:false,#isDemoRule:false,#name:'RTSimplifyToIfNilIfNotNil'}Nil'}

0 comments on commit ab0fa02

Please sign in to comment.