From a14f0cd5e9147091fcd4a0e33b6e399c115a46f7 Mon Sep 17 00:00:00 2001 From: Matt <85322+mattmassicotte@users.noreply.github.com> Date: Wed, 25 May 2022 07:35:25 -0400 Subject: [PATCH] Make sure to sort nodes to better handle conflicts --- Sources/Neon/TreeSitterClient.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/Neon/TreeSitterClient.swift b/Sources/Neon/TreeSitterClient.swift index ed0132c..b3a109c 100644 --- a/Sources/Neon/TreeSitterClient.swift +++ b/Sources/Neon/TreeSitterClient.swift @@ -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 }