This repository was archived by the owner on Oct 18, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
android-tree-sitter/src/main
java/com/itsaky/androidide/treesitter Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -89,6 +89,13 @@ Java_com_itsaky_androidide_treesitter_TSQuery_00024Native_patternRooted(
8989 return (jboolean)ts_query_is_pattern_rooted ((TSQuery*)query, pattern);
9090}
9191
92+ extern " C" JNIEXPORT jboolean JNICALL
93+ Java_com_itsaky_androidide_treesitter_TSQuery_00024Native_patternNonLocal (
94+ JNIEnv* env, jclass self, jlong query, jint pattern_index) {
95+ return (jboolean)ts_query_is_pattern_non_local ((TSQuery*)query,
96+ pattern_index);
97+ }
98+
9299extern " C" JNIEXPORT jboolean JNICALL
93100Java_com_itsaky_androidide_treesitter_TSQuery_00024Native_patternGuaranteedAtStep (
94101 JNIEnv* env, jclass self, jlong query, jint offset) {
Original file line number Diff line number Diff line change @@ -98,6 +98,11 @@ public boolean isPatternRooted(int pattern) {
9898 return Native .patternRooted (this .pointer , pattern );
9999 }
100100
101+ public boolean isPatternNonLocal (int pattern ) {
102+ validatePatternIndex (pattern );
103+ return Native .patternNonLocal (this .pointer , pattern );
104+ }
105+
101106 public boolean isPatternGuaranteedAtStep (int offset ) {
102107 return Native .patternGuaranteedAtStep (this .pointer , offset );
103108 }
@@ -139,7 +144,9 @@ private static class Native {
139144
140145 public static native boolean patternRooted (long query , int pattern );
141146
142- public static native boolean patternGuaranteedAtStep (long query , int offset );
147+ public static native boolean patternNonLocal (long query , int pattern );
148+
149+ public static native boolean patternGuaranteedAtStep (long query , int byteOffset );
143150
144151 public static native String captureNameForId (long query , int id );
145152
You can’t perform that action at this time.
0 commit comments