Skip to content

Commit fb84489

Browse files
docs: add version information to new methods
1 parent f020832 commit fb84489

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ private static UnsatisfiedLinkError unresolved(String name) {
6767
* must not be closed while the language is being used.</strong>
6868
*
6969
* @throws RuntimeException If the language could not be loaded.
70+
* @since 0.23.1
7071
*/
7172
// TODO: deprecate when the bindings are generated by the CLI
7273
public static Language load(SymbolLookup symbols, String language) throws RuntimeException {
@@ -136,7 +137,11 @@ public boolean isVisible(@Unsigned short symbol) {
136137
return ts_language_symbol_type(self, symbol) <= TSSymbolTypeAnonymous();
137138
}
138139

139-
/** Check if the node for the given numerical ID is a supertype. */
140+
/**
141+
* Check if the node for the given numerical ID is a supertype.
142+
*
143+
* @since 0.24.0
144+
*/
140145
public boolean isSupertype(@Unsigned short symbol) {
141146
return ts_language_symbol_type(self, symbol) == TSSymbolTypeSupertype();
142147
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ public List<Node> getChildrenByFieldName(String name) {
321321
*
322322
* @throws IndexOutOfBoundsException If the index exceeds the
323323
* {@linkplain #getNamedChildCount() child count}.
324+
* @since 0.24.0
324325
*/
325326
public @Nullable String getFieldNameForNamedChild(@Unsigned int index) throws IndexOutOfBoundsException {
326327
if (index >= getChildCount()) {

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ public Query setMatchLimit(@Unsigned int matchLimit) throws IllegalArgumentExcep
299299
* execution should be allowed to take before halting.
300300
*
301301
* @apiNote Defaults to {@code 0} (unlimited).
302+
* @since 0.23.1
302303
*/
303304
public @Unsigned long getTimeoutMicros() {
304305
return ts_query_cursor_timeout_micros(cursor);
@@ -307,6 +308,8 @@ public Query setMatchLimit(@Unsigned int matchLimit) throws IllegalArgumentExcep
307308
/**
308309
* Set the maximum duration in microseconds that query
309310
* execution should be allowed to take before halting.
311+
*
312+
* @since 0.23.1
310313
*/
311314
public Query setTimeoutMicros(@Unsigned long timeoutMicros) {
312315
ts_query_cursor_set_timeout_micros(cursor, timeoutMicros);
@@ -393,6 +396,7 @@ public void disableCapture(String name) throws NoSuchElementException {
393396
*
394397
* @throws IndexOutOfBoundsException If the index exceeds the
395398
* {@linkplain #getPatternCount pattern count}.
399+
* @since 0.23.0
396400
*/
397401
public @Unsigned int endByteForPattern(@Unsigned int index) throws IndexOutOfBoundsException {
398402
checkIndex(index);

0 commit comments

Comments
 (0)