Skip to content

Commit c86f5ae

Browse files
committed
reorder parameters to match kotlin convention
1 parent f60959d commit c86f5ae

File tree

1 file changed

+4
-4
lines changed
  • src/main/java/io/github/treesitter/jtreesitter

1 file changed

+4
-4
lines changed

src/main/java/io/github/treesitter/jtreesitter/Query.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)