Skip to content

Commit

Permalink
Merge pull request #38 from seart-group/bug/final
Browse files Browse the repository at this point in the history
  • Loading branch information
dabico committed Oct 1, 2023
2 parents 915d5d5 + e58d9e3 commit 8a6921d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 20 deletions.
5 changes: 0 additions & 5 deletions lib/ch_usi_si_seart_treesitter_QueryCursor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ JNIEXPORT void JNICALL Java_ch_usi_si_seart_treesitter_QueryCursor_execute(
env->SetBooleanField(thisObject, _queryCursorExecutedField, JNI_TRUE);
}

JNIEXPORT jboolean JNICALL Java_ch_usi_si_seart_treesitter_QueryCursor_isExecuted(
JNIEnv* env, jobject thisObject) {
return env->GetBooleanField(thisObject, _queryCursorExecutedField);
}

JNIEXPORT jobject JNICALL Java_ch_usi_si_seart_treesitter_QueryCursor_nextMatch(
JNIEnv* env, jobject thisObject) {
bool executed = (bool)env->GetBooleanField(thisObject, _queryCursorExecutedField);
Expand Down
8 changes: 0 additions & 8 deletions lib/ch_usi_si_seart_treesitter_QueryCursor.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 4 additions & 7 deletions src/main/java/ch/usi/si/seart/treesitter/QueryCursor.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

import lombok.AccessLevel;
import lombok.Generated;
import lombok.Getter;
import lombok.experimental.FieldDefaults;
import lombok.experimental.NonFinal;
import org.jetbrains.annotations.NotNull;

import java.util.Iterator;
Expand All @@ -22,7 +24,8 @@ public class QueryCursor extends External implements Iterable<QueryMatch> {
Node node;
Query query;

@SuppressWarnings("unused")
@Getter
@NonFinal
boolean executed = false;

@SuppressWarnings("unused")
Expand Down Expand Up @@ -53,12 +56,6 @@ public QueryCursor(@NotNull Node node, @NotNull Query query) {
*/
public native void execute();

/**
* @return {@code true} if the query was executed, {@code false} otherwise
* @since 1.5.0
*/
public native boolean isExecuted();

/**
* Advance to the next match of the currently running query.
*
Expand Down

0 comments on commit 8a6921d

Please sign in to comment.