-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ported all transformation Slime rules
- Loading branch information
Showing
66 changed files
with
364 additions
and
9 deletions.
There are no files selected for viewing
Empty file.
4 changes: 4 additions & 0 deletions
4
repository/Grease-Pharo110-Slime.package/GRAnsiCollectionsRule.class/instance/group.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
group | ||
|
||
^ 'ANSI Compatibility' |
30 changes: 30 additions & 0 deletions
30
repository/Grease-Pharo110-Slime.package/GRAnsiCollectionsRule.class/instance/initialize.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
initialization | ||
initialize | ||
super initialize. | ||
self | ||
replace: '``@collection withIndexDo: [ :`each :`index | | `@temps | ``@.body ]' | ||
with: '``@collection keysAndValuesDo: [ :`index :`each | | `@temps | ``@.body ]'; | ||
replace: '``@collection doWithIndex: [ :`each :`index | | `@temps | ``@.body ]' | ||
with: '``@collection keysAndValuesDo: [ :`index :`each | | `@temps | ``@.body ]'; | ||
replace: '``@collection collect: ``@block1 thenDo: ``@block2' | ||
with: '(``@collection collect: ``@block1) do: ``@block2'; | ||
replace: '``@collection collect: ``@block1 thenSelect: ``@block2' | ||
with: '(``@collection collect: ``@block1) select: ``@block2'; | ||
replace: '``@collection pairsDo: [ :`t1 :`t2 | ``@.statements ]' | ||
with: '1 to: ``@collection size by: 2 do: [ :index | | `t1 `t2 | `t1 := ``@collection at: index. `t2 := ``@collection at: index + 1. ``@.statements ]'; | ||
replace: '``@collection reject: ``@block1 thenDo: ``@block2' | ||
with: '(``@collection reject: ``@block1) do: ``@block2'; | ||
replace: '``@collection select: ``@block1 thenCollect: ``@block2' | ||
with: '(``@collection select: ``@block1) collect: ``@block2'; | ||
replace: '``@collection select: ``@block1 thenDo: ``@block2' | ||
with: '(``@collection select: ``@block1) do: ``@block2'; | ||
replace: '``@collection detectSum: [ :`t1 | ``@.statements. `.last ]' | ||
with: '``@collection inject: 0 into: [ :sum :`t1 | ``@.statements. sum + (`.last) ]'; | ||
replace: '``@collection valuesDo: ``@block' | ||
with: '``@collection do: ``@block'; | ||
replace: '``@collection reversed' | ||
with: '``@collection reverse'; | ||
replace: '``@dictionary keysSortedSafely' | ||
with: '``@dictionary keys asSortedCollection'; | ||
replace: '``@collectionClass new: ``@size withAll: ``@character' | ||
with: '(``@collectionClass new: ``@size) atAllPut: ``@character' |
4 changes: 4 additions & 0 deletions
4
repository/Grease-Pharo110-Slime.package/GRAnsiCollectionsRule.class/instance/name.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
name | ||
|
||
^ 'Collections' |
4 changes: 4 additions & 0 deletions
4
repository/Grease-Pharo110-Slime.package/GRAnsiCollectionsRule.class/instance/rationale.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
rationale | ||
|
||
^ 'Some collection methods are not ANSI compatible: #pairsDo:, #collect:thenDo:, #reject:thenDo:, #detectSum:, #valuesDo:, #keysSortedSafely, #new:withAll:, etc.' |
11 changes: 11 additions & 0 deletions
11
repository/Grease-Pharo110-Slime.package/GRAnsiCollectionsRule.class/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"commentStamp" : "", | ||
"super" : "GRReSlimeTransformationRule", | ||
"category" : "Grease-Pharo110-Slime", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ ], | ||
"name" : "GRAnsiCollectionsRule", | ||
"type" : "normal" | ||
} |
Empty file.
4 changes: 4 additions & 0 deletions
4
repository/Grease-Pharo110-Slime.package/GRAnsiConditionalsRule.class/instance/group.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
group | ||
|
||
^ 'ANSI Compatibility' |
17 changes: 17 additions & 0 deletions
17
repository/Grease-Pharo110-Slime.package/GRAnsiConditionalsRule.class/instance/initialize.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
initialization | ||
initialize | ||
|
||
super initialize. | ||
self | ||
replace: '``@boolean ifNotNilDo: ``@block' | ||
with: '``@boolean ifNotNil: ``@block'; | ||
replace: '``@boolean ifNotNilDo: ``@block1 ifNil: ``@block2' | ||
with: '``@boolean ifNotNil: ``@block1 ifNil: ``@block2'; | ||
replace: '``@boolean ifNil: ``@block1 ifNotNilDo: ``@block2' | ||
with: '``@boolean ifNil: ``@block1 ifNotNil: ``@block2'; | ||
replace: '``@boolean ifNotNil: [ | `@temps | ``@.body ]' | ||
with: '``@boolean ifNotNil: [ :arg | | `@temps | ``@.body ]'; | ||
replace: '``@boolean ifNotNil: [ | `@temps | ``@.body ] ifNil: ``@block ' | ||
with: '``@boolean ifNotNil: [ :arg | | `@temps | ``@.body ] ifNil: ``@block'; | ||
replace: '``@boolean ifNil: ``@block ifNotNil: [ | `@temps | ``@.body ]' | ||
with: '``@boolean ifNil: ``@block ifNotNil: [ :arg | | `@temps | ``@.body ]' |
4 changes: 4 additions & 0 deletions
4
repository/Grease-Pharo110-Slime.package/GRAnsiConditionalsRule.class/instance/name.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
name | ||
|
||
^ 'Conditionals' |
4 changes: 4 additions & 0 deletions
4
repository/Grease-Pharo110-Slime.package/GRAnsiConditionalsRule.class/instance/rationale.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
rationale | ||
|
||
^ 'Conditionals like #ifNotNilDo: are not ANSI compatible.' |
11 changes: 11 additions & 0 deletions
11
repository/Grease-Pharo110-Slime.package/GRAnsiConditionalsRule.class/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"commentStamp" : "", | ||
"super" : "GRReSlimeTransformationRule", | ||
"category" : "Grease-Pharo110-Slime", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ ], | ||
"name" : "GRAnsiConditionalsRule", | ||
"type" : "normal" | ||
} |
Empty file.
4 changes: 4 additions & 0 deletions
4
repository/Grease-Pharo110-Slime.package/GRAnsiConvertorRule.class/instance/group.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
group | ||
|
||
^ 'ANSI Compatibility' |
7 changes: 7 additions & 0 deletions
7
repository/Grease-Pharo110-Slime.package/GRAnsiConvertorRule.class/instance/initialize.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
initialization | ||
initialize | ||
|
||
super initialize. | ||
self | ||
replace: '``@object asString' with: '``@object greaseString'; | ||
replace: '``@object asInteger' with: '``@object greaseInteger' |
4 changes: 4 additions & 0 deletions
4
repository/Grease-Pharo110-Slime.package/GRAnsiConvertorRule.class/instance/name.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
name | ||
|
||
^ 'Convertors' |
4 changes: 4 additions & 0 deletions
4
repository/Grease-Pharo110-Slime.package/GRAnsiConvertorRule.class/instance/rationale.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
rationale | ||
|
||
^ 'The ANSI standard does not support #asInteger and #asString on Object.' |
11 changes: 11 additions & 0 deletions
11
repository/Grease-Pharo110-Slime.package/GRAnsiConvertorRule.class/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"commentStamp" : "", | ||
"super" : "GRReSlimeTransformationRule", | ||
"category" : "Grease-Pharo110-Slime", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ ], | ||
"name" : "GRAnsiConvertorRule", | ||
"type" : "normal" | ||
} |
Empty file.
4 changes: 4 additions & 0 deletions
4
repository/Grease-Pharo110-Slime.package/GRAnsiExceptionsRule.class/instance/group.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
group | ||
|
||
^ 'ANSI Compatibility' |
7 changes: 7 additions & 0 deletions
7
repository/Grease-Pharo110-Slime.package/GRAnsiExceptionsRule.class/instance/initialize.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
initialization | ||
initialize | ||
|
||
super initialize. | ||
self | ||
replace: '``@block on: `class do: [ | `@temps | ``@.body ]' | ||
with: '``@block on: `class do: [ :err | | `@temps | ``@.body ]' |
4 changes: 4 additions & 0 deletions
4
repository/Grease-Pharo110-Slime.package/GRAnsiExceptionsRule.class/instance/name.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
name | ||
|
||
^ 'Exceptions' |
4 changes: 4 additions & 0 deletions
4
repository/Grease-Pharo110-Slime.package/GRAnsiExceptionsRule.class/instance/rationale.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
rationale | ||
|
||
^ 'Exception handlers expect exactly one argument in ANSI.' |
11 changes: 11 additions & 0 deletions
11
repository/Grease-Pharo110-Slime.package/GRAnsiExceptionsRule.class/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"commentStamp" : "", | ||
"super" : "GRReSlimeTransformationRule", | ||
"category" : "Grease-Pharo110-Slime", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ ], | ||
"name" : "GRAnsiExceptionsRule", | ||
"type" : "normal" | ||
} |
Empty file.
4 changes: 4 additions & 0 deletions
4
repository/Grease-Pharo110-Slime.package/GRAnsiStreamsRule.class/instance/group.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
group | ||
|
||
^ 'ANSI Compatibility' |
13 changes: 13 additions & 0 deletions
13
repository/Grease-Pharo110-Slime.package/GRAnsiStreamsRule.class/instance/initialize.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
initialization | ||
initialize | ||
|
||
super initialize. | ||
self | ||
replace: '`{ :node :context | node isVariable and: [ (Smalltalk includesKey: node name asSymbol) not and: [ context at: ''`receiver'' ifAbsentPut: [ node ]. true ] ] } cr' | ||
with: '`{ :context | context at: ''`receiver'' } nextPut: Character cr'; | ||
replace: '`{ :node :context | node isVariable and: [ (Smalltalk includesKey: node name asSymbol) not and: [ context at: ''`receiver'' ifAbsentPut: [ node ]. true ] ] } lf' | ||
with: '`{ :context | context at: ''`receiver'' } nextPut: Character lf'; | ||
replace: '``@stream nextPut: Character cr; nextPut: Character lf' | ||
with: '``@stream crlf'; | ||
replace: '``@collection writeStream' | ||
with: 'WriteStream on: ``@collection' |
4 changes: 4 additions & 0 deletions
4
repository/Grease-Pharo110-Slime.package/GRAnsiStreamsRule.class/instance/name.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
name | ||
|
||
^ 'Streams' |
4 changes: 4 additions & 0 deletions
4
repository/Grease-Pharo110-Slime.package/GRAnsiStreamsRule.class/instance/rationale.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
rationale | ||
|
||
^ '#cr and #lf are not part of the ANSI stream protocol.' |
11 changes: 11 additions & 0 deletions
11
repository/Grease-Pharo110-Slime.package/GRAnsiStreamsRule.class/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"commentStamp" : "", | ||
"super" : "GRReSlimeTransformationRule", | ||
"category" : "Grease-Pharo110-Slime", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ ], | ||
"name" : "GRAnsiStreamsRule", | ||
"type" : "normal" | ||
} |
Empty file.
4 changes: 4 additions & 0 deletions
4
repository/Grease-Pharo110-Slime.package/GRAnsiStringsRule.class/instance/group.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
group | ||
|
||
^ 'ANSI Compatibility' |
25 changes: 25 additions & 0 deletions
25
repository/Grease-Pharo110-Slime.package/GRAnsiStringsRule.class/instance/initialize.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
initialization | ||
initialize | ||
|
||
super initialize. | ||
self | ||
replace: 'String tab' with: '(String with: Character tab)'; | ||
replace: 'String cr' with: '(String with: Character cr)'; | ||
replace: 'String lf' with: '(String with: Character lf)'; | ||
replace: 'String crlf' with: '(String with: Character cr with: Character lf)'; | ||
replace: 'String space' with: '(String with: Character space)'; | ||
replace: '`@string includesSubString: `@subString' | ||
with: '(`@string indexOfSubCollection: `@subString startingAt: 0) ~= 0'; | ||
replace: '`@string includesSubstring: `@subString' | ||
with: '(`@string indexOfSubCollection: `@subString startingAt: 0) ~= 0' | ||
"replace: '``@string findTokens: ``@arg' withValueFrom: [ :node | | ||
| argument | | ||
argument := node arguments first. | ||
argument isLiteralNode ifTrue: [ | ||
argument value isArray | ||
ifTrue: [ argument replaceWith: (RBLiteralNode value: (String withAll: argument value)) ]. | ||
argument value isCharacter | ||
ifTrue: [ argument replaceWith: (RBLiteralNode value: (String with: argument value)) ] ]. | ||
node | ||
selector: #subStrings:; | ||
yourself ]" |
4 changes: 4 additions & 0 deletions
4
repository/Grease-Pharo110-Slime.package/GRAnsiStringsRule.class/instance/name.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
name | ||
|
||
^ 'Strings' |
4 changes: 4 additions & 0 deletions
4
repository/Grease-Pharo110-Slime.package/GRAnsiStringsRule.class/instance/rationale.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
rationale | ||
|
||
^ '#cr, #crlf, #lf, #space, #tab, #findTokens:, ... are not part of the ANSI string protocol.' |
11 changes: 11 additions & 0 deletions
11
repository/Grease-Pharo110-Slime.package/GRAnsiStringsRule.class/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"commentStamp" : "", | ||
"super" : "GRReSlimeTransformationRule", | ||
"category" : "Grease-Pharo110-Slime", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ ], | ||
"name" : "GRAnsiStringsRule", | ||
"type" : "normal" | ||
} |
Empty file.
4 changes: 4 additions & 0 deletions
4
...sitory/Grease-Pharo110-Slime.package/GRNotPortableCollectionsRule.class/instance/group.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
group | ||
|
||
^ 'Grease Portability' |
9 changes: 9 additions & 0 deletions
9
...y/Grease-Pharo110-Slime.package/GRNotPortableCollectionsRule.class/instance/initialize.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
initialization | ||
initialize | ||
|
||
super initialize. | ||
self | ||
replace: '`@collection beginsWith: `@subCollection' | ||
with: '`@collection greaseBeginsWith: `@subCollection'; | ||
replace: '`@collection endsWith: `@subCollection' | ||
with: '`@collection greaseEndsWith: `@subCollection' |
4 changes: 4 additions & 0 deletions
4
repository/Grease-Pharo110-Slime.package/GRNotPortableCollectionsRule.class/instance/name.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
name | ||
|
||
^ 'Collections' |
4 changes: 4 additions & 0 deletions
4
...ry/Grease-Pharo110-Slime.package/GRNotPortableCollectionsRule.class/instance/rationale.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
rationale | ||
|
||
^ '#beginsWith: and #endsWith: are not portable.' |
11 changes: 11 additions & 0 deletions
11
repository/Grease-Pharo110-Slime.package/GRNotPortableCollectionsRule.class/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"commentStamp" : "", | ||
"super" : "GRReSlimeTransformationRule", | ||
"category" : "Grease-Pharo110-Slime", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ ], | ||
"name" : "GRNotPortableCollectionsRule", | ||
"type" : "normal" | ||
} |
1 change: 1 addition & 0 deletions
1
repository/Grease-Pharo110-Slime.package/GRObjectInRule.class/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
I detect senders of Object >> #in: |
4 changes: 4 additions & 0 deletions
4
repository/Grease-Pharo110-Slime.package/GRObjectInRule.class/instance/group.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
group | ||
|
||
^ 'Grease Portability' |
7 changes: 7 additions & 0 deletions
7
repository/Grease-Pharo110-Slime.package/GRObjectInRule.class/instance/initialize.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
initialization | ||
initialize | ||
|
||
super initialize. | ||
self | ||
replace: '``@object in: [ :`var | | `@temps | `@.statements ]' | ||
with: '[ :`var | | `@temps | `@.statements ] value: ``@object' |
4 changes: 4 additions & 0 deletions
4
repository/Grease-Pharo110-Slime.package/GRObjectInRule.class/instance/name.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
name | ||
|
||
^ 'Object>>#in:' |
4 changes: 4 additions & 0 deletions
4
repository/Grease-Pharo110-Slime.package/GRObjectInRule.class/instance/rationale.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
rationale | ||
|
||
^ 'Object>>#in: has different semantics on different Smalltalk dialects.' |
11 changes: 11 additions & 0 deletions
11
repository/Grease-Pharo110-Slime.package/GRObjectInRule.class/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"commentStamp" : "pmm 9/12/2009 10:37", | ||
"super" : "GRReSlimeTransformationRule", | ||
"category" : "Grease-Pharo110-Slime", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ ], | ||
"name" : "GRObjectInRule", | ||
"type" : "normal" | ||
} |
1 change: 1 addition & 0 deletions
1
repository/Grease-Pharo110-Slime.package/GRTestAssertionsRule.class/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
I check for TestCase >> #fail. |
8 changes: 8 additions & 0 deletions
8
...Grease-Pharo110-Slime.package/GRTestAssertionsRule.class/instance/afterCheck.mappings..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
hooks | ||
afterCheck: aNode mappings: mappingsDict | ||
|
||
aNode methodNode methodClass isMeta | ||
ifTrue: [ ^ false ]. | ||
(aNode methodNode methodClass allSuperclasses includes: (Smalltalk at: #TestCase)) | ||
ifTrue: [ ^ true ]. | ||
^ false |
Oops, something went wrong.