Skip to content

Implement comparable, add static compare method#1192

Merged
srchase merged 2 commits intosmithy-lang:mainfrom
srchase:source-location-sorter
Apr 19, 2022
Merged

Implement comparable, add static compare method#1192
srchase merged 2 commits intosmithy-lang:mainfrom
srchase:source-location-sorter

Conversation

@srchase
Copy link
Copy Markdown
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