Skip to content

Commit 3909ebc

Browse files
docs: add version information to new methods
1 parent a4fcd52 commit 3909ebc

File tree

12 files changed

+37
-5
lines changed

12 files changed

+37
-5
lines changed

ktreesitter/src/androidMain/kotlin/io/github/treesitter/ktreesitter/Language.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,11 @@ actual class Language @Throws(IllegalArgumentException::class) actual constructo
6565
@JvmName("isVisible")
6666
actual external fun isVisible(symbol: UShort): Boolean
6767

68-
/** Check if the node for the given numerical ID is a supertype. */
68+
/**
69+
* Check if the node for the given numerical ID is a supertype.
70+
*
71+
* @since 0.24.0
72+
*/
6973
@FastNative
7074
@JvmName("isSupertype")
7175
actual external fun isSupertype(symbol: UShort): Boolean

ktreesitter/src/androidMain/kotlin/io/github/treesitter/ktreesitter/Node.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ actual class Node internal constructor(
242242
* Get the field name of this node’s _named_ child at the given index, if available.
243243
*
244244
* @throws [IndexOutOfBoundsException] If the index exceeds the [child count][childCount].
245+
* @since 0.24.0
245246
*/
246247
@FastNative
247248
@JvmName("fieldNameForNamedChild")

ktreesitter/src/androidMain/kotlin/io/github/treesitter/ktreesitter/Query.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import dalvik.annotation.optimization.FastNative
66
/**
77
* A class that represents a set of patterns which match nodes in a syntax tree.
88
*
9-
* __NOTE__: If you're targeting Android SDK level < 33,
9+
* __NOTE:__ If you're targeting Android SDK level < 33,
1010
* you must `use` or [close] the instance to free up resources.
1111
*
1212
* @constructor
@@ -272,6 +272,8 @@ actual class Query @Throws(QueryError::class) actual constructor(
272272
* execution should be allowed to take before halting.
273273
*
274274
* Default: `0`
275+
*
276+
* @since 0.23.0
275277
*/
276278
@get:JvmName("getTimeoutMicros")
277279
@set:JvmName("setTimeoutMicros")
@@ -477,6 +479,7 @@ actual class Query @Throws(QueryError::class) actual constructor(
477479
*
478480
* @throws [IndexOutOfBoundsException]
479481
* If the index exceeds the [pattern count][patternCount].
482+
* @since 0.23.0
480483
*/
481484
@FastNative
482485
@JvmName("endByteForPattern")

ktreesitter/src/commonMain/kotlin/io/github/treesitter/ktreesitter/Language.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@ expect class Language @Throws(IllegalArgumentException::class) constructor(langu
3838
/** Check if the node for the given numerical ID is visible. */
3939
fun isVisible(symbol: UShort): Boolean
4040

41-
/** Check if the node for the given numerical ID is a supertype. */
41+
/**
42+
* Check if the node for the given numerical ID is a supertype.
43+
*
44+
* @since 0.24.0
45+
*/
4246
fun isSupertype(symbol: UShort): Boolean
4347

4448
/** Get the field name for the given numerical id. */

ktreesitter/src/commonMain/kotlin/io/github/treesitter/ktreesitter/Node.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ expect class Node {
182182
* Get the field name of this node’s _named_ child at the given index, if available.
183183
*
184184
* @throws [IndexOutOfBoundsException] If the index exceeds the [child count][childCount].
185+
* @since 0.24.0
185186
*/
186187
@Throws(IndexOutOfBoundsException::class)
187188
fun fieldNameForNamedChild(index: UInt): String?

ktreesitter/src/commonMain/kotlin/io/github/treesitter/ktreesitter/Query.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ expect class Query @Throws(QueryError::class) constructor(language: Language, so
2020
* execution should be allowed to take before halting.
2121
*
2222
* Default: `0`
23+
*
24+
* @since 0.23.0
2325
*/
2426
var timeoutMicros: ULong
2527

@@ -160,6 +162,7 @@ expect class Query @Throws(QueryError::class) constructor(language: Language, so
160162
*
161163
* @throws [IndexOutOfBoundsException]
162164
* If the index exceeds the [pattern count][patternCount].
165+
* @since 0.23.0
163166
*/
164167
@Throws(IndexOutOfBoundsException::class)
165168
fun endByteForPattern(index: UInt): UInt

ktreesitter/src/jvmMain/kotlin/io/github/treesitter/ktreesitter/Language.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,11 @@ actual class Language @Throws(IllegalArgumentException::class) actual constructo
5959
@JvmName("isVisible")
6060
actual external fun isVisible(symbol: UShort): Boolean
6161

62-
/** Check if the node for the given numerical ID is a supertype. */
62+
/**
63+
* Check if the node for the given numerical ID is a supertype.
64+
*
65+
* @since 0.24.0
66+
*/
6367
@JvmName("isSupertype")
6468
actual external fun isSupertype(symbol: UShort): Boolean
6569

ktreesitter/src/jvmMain/kotlin/io/github/treesitter/ktreesitter/Node.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ actual class Node internal constructor(
238238
* Get the field name of this node’s _named_ child at the given index, if available.
239239
*
240240
* @throws [IndexOutOfBoundsException] If the index exceeds the [child count][childCount].
241+
* @since 0.24.0
241242
*/
242243
@JvmName("fieldNameForNamedChild")
243244
@Throws(IndexOutOfBoundsException::class)

ktreesitter/src/jvmMain/kotlin/io/github/treesitter/ktreesitter/Query.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,8 @@ actual class Query @Throws(QueryError::class) actual constructor(
266266
* execution should be allowed to take before halting.
267267
*
268268
* Default: `0`
269+
*
270+
* @since 0.23.0
269271
*/
270272
@get:JvmName("getTimeoutMicros")
271273
@set:JvmName("setTimeoutMicros")
@@ -467,6 +469,7 @@ actual class Query @Throws(QueryError::class) actual constructor(
467469
*
468470
* @throws [IndexOutOfBoundsException]
469471
* If the index exceeds the [pattern count][patternCount].
472+
* @since 0.23.0
470473
*/
471474
@JvmName("endByteForPattern")
472475
@Throws(IndexOutOfBoundsException::class)

ktreesitter/src/nativeMain/kotlin/io/github/treesitter/ktreesitter/Language.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@ actual class Language @Throws(IllegalArgumentException::class) actual constructo
5858
actual fun isVisible(symbol: UShort) =
5959
ts_language_symbol_type(self, symbol) <= TSSymbolTypeAnonymous
6060

61-
/** Check if the node for the given numerical ID is a supertype. */
61+
/**
62+
* Check if the node for the given numerical ID is a supertype.
63+
*
64+
* @since 0.24.0
65+
*/
6266
actual fun isSupertype(symbol: UShort) =
6367
ts_language_symbol_type(self, symbol) == TSSymbolTypeSupertype
6468

0 commit comments

Comments
 (0)