Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rule to use #min: and #max: instead of comparisons #67

Open
jecisc opened this issue May 3, 2020 · 2 comments
Open

Add rule to use #min: and #max: instead of comparisons #67

jecisc opened this issue May 3, 2020 · 2 comments
Milestone

Comments

@jecisc
Copy link
Owner

jecisc commented May 3, 2020

No description provided.

@jecisc jecisc added this to the v1.1.x milestone May 3, 2020
@jecisc
Copy link
Owner Author

jecisc commented May 3, 2020

	replace: '``@a < ``@b ifTrue: [``@a] ifFalse: [``@b]' with: '``@a min: ``@b';
	replace: '``@a <= ``@b ifTrue: [``@a] ifFalse: [``@b]' with: '``@a min: ``@b';
	replace: '``@a > ``@b ifTrue: [``@a] ifFalse: [``@b]' with: '``@a max: ``@b';
	replace: '``@a >= ``@b ifTrue: [``@a] ifFalse: [``@b]' with: '``@a max: ``@b';
	replace: '``@a < ``@b ifTrue: [``@b] ifFalse: [``@a]' with: '``@a max: ``@b';
	replace: '``@a <= ``@b ifTrue: [``@b] ifFalse: [``@a]' with: '``@a max: ``@b';
	replace: '``@a > ``@b ifTrue: [``@b] ifFalse: [``@a]' with: '``@a min: ``@b';
	replace:  '``@a >= ``@b ifTrue: [``@b] ifFalse: [``@a]' with: '``@a min: ``@b';
	replace: '`a < ``@b ifTrue: [`a := ``@b]' with: '`a := `a max: ``@b';
	replace: '`a <= ``@b ifTrue: [`a := ``@b]' with: '`a := `a max: ``@b';
	replace: '`a < ``@b ifFalse: [`a := ``@b]' with: '`a := `a min: ``@b';
	replace: '`a <= ``@b ifFalse: [`a := ``@b]' with: '`a := `a min: ``@b';
	replace: '`a > ``@b ifTrue: [`a := ``@b]' with: '`a := `a min: ``@b';
	replace: '`a >= ``@b ifTrue: [`a := ``@b]' with: '`a := `a min: ``@b';
	replace: '`a > ``@b ifFalse: [`a := ``@b]' with: '`a := `a max: ``@b';
	replace: '`a >= ``@b ifFalse: [`a := ``@b]' with: '`a := `a max: ``@b';
	replace: '``@b < `a ifTrue: [`a := ``@b]' with: '`a := `a min: ``@b';
	replace: '``@b <= `a ifTrue: [`a := ``@b]' with: '`a := `a min: ``@b';
	replace: '``@b < `a ifFalse: [`a := ``@b]' with: '`a := `a max: ``@b';
	replace: '``@b <= `a ifFalse: [`a := ``@b]' with: '`a := `a max: ``@b';
	replace: '``@b > `a ifTrue: [`a := ``@b]' with: '`a := `a max: ``@b';
	replace: '``@b >= `a ifTrue: [`a := ``@b]' with: '`a := `a max: ``@b';
	replace: '``@b > `a ifFalse: [`a := ``@b]' with: '`a := `a min: ``@b';
	replace: '``@b >= `a ifFalse: [`a := ``@b]' with: '`a := `a min: ``@b'

@jecisc
Copy link
Owner Author

jecisc commented May 3, 2020

Maybe add also a new cleaner after doing the #min:max: one.

@jecisc jecisc modified the milestones: v1.1.x, v1.x.x May 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant