Skip to content

Commit

Permalink
Make sure to sort nodes to better handle conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmassicotte committed May 25, 2022
1 parent 7c16821 commit a14f0cd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Sources/Neon/TreeSitterClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ extension TreeSitterClient {
return cursor
.map({ $0.captures })
.flatMap({ $0 })
.sorted()
.compactMap { capture -> Token? in
guard let name = capture.name else { return nil }

Expand Down

0 comments on commit a14f0cd

Please sign in to comment.