@@ -485,7 +485,7 @@ public Map<String, Optional<String>> getPatternAssertions(@Unsigned int index, b
485485 * @param node The node that the query will run on.
486486 */
487487 public Stream <QueryMatch > findMatches (Node node ) {
488- return findMatches (node , null , arena );
488+ return findMatches (node , arena , null );
489489 }
490490
491491
@@ -508,7 +508,7 @@ public Stream<QueryMatch> findMatches(Node node) {
508508 * @param predicate A function that handles custom predicates.
509509 */
510510 public Stream <QueryMatch > findMatches (Node node , @ Nullable BiPredicate <QueryPredicate , QueryMatch > predicate ){
511- return findMatches (node , predicate , arena );
511+ return findMatches (node , arena , predicate );
512512 }
513513
514514
@@ -517,10 +517,10 @@ public Stream<QueryMatch> findMatches(Node node, @Nullable BiPredicate<QueryPred
517517 * given allocator.
518518 *
519519 * @param node The node that the query will run on.
520- * @param predicate A function that handles custom predicates.
521520 * @param allocator The allocator that is used to allocate the native memory of the returned matches.
521+ * @param predicate A function that handles custom predicates.
522522 */
523- public Stream <QueryMatch > findMatches (Node node , @ Nullable BiPredicate <QueryPredicate , QueryMatch > predicate , SegmentAllocator allocator ) {
523+ public Stream <QueryMatch > findMatches (Node node , SegmentAllocator allocator , @ Nullable BiPredicate <QueryPredicate , QueryMatch > predicate ) {
524524 try (var alloc = Arena .ofConfined ()) {
525525 ts_query_cursor_exec (cursor , query , node .copy (alloc ));
526526 }
0 commit comments