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

Implement comparable, add static compare method #1192

Merged
merged 2 commits into from
Apr 19, 2022

Conversation

srchase
Copy link
Contributor

@srchase srchase commented Apr 15, 2022

This CR implements Comparable on SourceLocation and adds a compare static method to FromSourceLocation for comparing SourceLocations.

This can be used to compare and sort shapes or traits, replacing the SourceLocationSorter and TraitSorter added in #1175. It will also be used to sort shapes in the Smithy Language Server (smithy-lang/smithy-language-server#35).

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@srchase srchase requested a review from a team as a code owner April 15, 2022 23:17
@srchase srchase force-pushed the source-location-sorter branch from 6b539cc to c3badd0 Compare April 18, 2022 15:27
@srchase srchase changed the title Add SourceLocation Sorter Add FromSourceLocation compare method Apr 18, 2022
@srchase srchase force-pushed the source-location-sorter branch from c3badd0 to be278ba Compare April 18, 2022 20:15
@srchase srchase changed the title Add FromSourceLocation compare method Implement comparable, add static compare method Apr 18, 2022
@srchase srchase force-pushed the source-location-sorter branch from be278ba to c99fcaf Compare April 18, 2022 23:15
@srchase srchase force-pushed the source-location-sorter branch from c9ecec0 to bb54034 Compare April 18, 2022 23:36
@srchase srchase merged commit 1863d67 into smithy-lang:main Apr 19, 2022
@srchase srchase deleted the source-location-sorter branch April 19, 2022 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants