Language

actual class Language constructor(language: Any)(source)

A class that defines how to parse a particular language.

When a Language is generated by the Tree-sitter CLI, it is assigned an ABI version number that corresponds to the current CLI version.

Parameters

language

A pointer to a TSLanguage cast to Long.

Throws

If the pointer is invalid or the version is incompatible.

expect class Language constructor(language: Any)(source)

A class that defines how to parse a particular language.

When a Language is generated by the Tree-sitter CLI, it is assigned an ABI version number that corresponds to the current CLI version.

Throws

If the pointer is invalid or the version is incompatible.

actual class Language constructor(language: Any)(source)

A class that defines how to parse a particular language.

When a Language is generated by the Tree-sitter CLI, it is assigned an ABI version number that corresponds to the current CLI version.

Parameters

language

A pointer to a TSLanguage cast to Long.

Throws

If the pointer is invalid or the version is incompatible.

actual class Language constructor(language: Any)(source)

A class that defines how to parse a particular language.

When a Language is generated by the Tree-sitter CLI, it is assigned an ABI version number that corresponds to the current CLI version.

Constructors

Link copied to clipboard
actual constructor(language: Any)

Create a new instance from the given language pointer.

expect constructor(language: Any)

Create a new instance from the given language pointer.

actual constructor(language: Any)

Create a new instance from the given language pointer.

actual constructor(language: Any)

Create a new instance from the given language pointer.

Properties

Link copied to clipboard
@get:JvmName(name = "getFieldCount")
actual val fieldCount: UInt

The number of distinct field names in this language.

expect val fieldCount: UInt

The number of distinct field names in this language.

@get:JvmName(name = "getFieldCount")
actual val fieldCount: UInt

The number of distinct field names in this language.

actual val fieldCount: UInt

The number of distinct field names in this language.

Link copied to clipboard
@get:JvmName(name = "getStateCount")
actual val stateCount: UInt

The number of valid states in this language.

expect val stateCount: UInt

The number of valid states in this language.

@get:JvmName(name = "getStateCount")
actual val stateCount: UInt

The number of valid states in this language.

actual val stateCount: UInt

The number of valid states in this language.

Link copied to clipboard
@get:JvmName(name = "getSymbolCount")
actual val symbolCount: UInt

The number of distinct node types in this language.

expect val symbolCount: UInt

The number of distinct node types in this language.

@get:JvmName(name = "getSymbolCount")
actual val symbolCount: UInt

The number of distinct node types in this language.

actual val symbolCount: UInt

The number of distinct node types in this language.

Link copied to clipboard
@get:JvmName(name = "getVersion")
actual val version: UInt

The ABI version number for this language.

expect val version: UInt

The ABI version number for this language.

@get:JvmName(name = "getVersion")
actual val version: UInt

The ABI version number for this language.

actual val version: UInt

The ABI version number for this language.

Functions

Link copied to clipboard
actual fun copy(): Language

Get another reference to the language.

expect fun copy(): Language

Get another reference to the language.

actual fun copy(): Language

Get another reference to the language.

actual fun copy(): Language

Get another reference to the language.

Link copied to clipboard
actual open operator override fun equals(other: Any?): Boolean
expect open operator override fun equals(other: Any?): Boolean
actual open operator override fun equals(other: Any?): Boolean
actual open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
@JvmName(name = "fieldIdForName")
actual external fun fieldIdForName(name: String): UShort

Get the numerical ID for the given field name.

expect fun fieldIdForName(name: String): UShort

Get the numerical ID for the given field name.

@JvmName(name = "fieldIdForName")
actual external fun fieldIdForName(name: String): UShort

Get the numerical ID for the given field name.

actual fun fieldIdForName(name: String): UShort

Get the numerical ID for the given field name.

Link copied to clipboard
@JvmName(name = "fieldNameForId")
actual external fun fieldNameForId(id: UShort): String?

Get the field name for the given numerical id.

expect fun fieldNameForId(id: UShort): String?

Get the field name for the given numerical id.

@JvmName(name = "fieldNameForId")
actual external fun fieldNameForId(id: UShort): String?

Get the field name for the given numerical id.

actual fun fieldNameForId(id: UShort): String?

Get the field name for the given numerical id.

Link copied to clipboard
actual open override fun hashCode(): Int
expect open override fun hashCode(): Int
actual open override fun hashCode(): Int
actual open override fun hashCode(): Int
Link copied to clipboard
@JvmName(name = "isNamed")
actual external fun isNamed(symbol: UShort): Boolean

Check if the node for the given numerical ID is named

expect fun isNamed(symbol: UShort): Boolean

Check if the node for the given numerical ID is named

@JvmName(name = "isNamed")
actual external fun isNamed(symbol: UShort): Boolean

Check if the node for the given numerical ID is named

actual fun isNamed(symbol: UShort): Boolean

Check if the node for the given numerical ID is named

Link copied to clipboard
@JvmName(name = "isSupertype")
actual external fun isSupertype(symbol: UShort): Boolean

Check if the node for the given numerical ID is a supertype.

expect fun isSupertype(symbol: UShort): Boolean

Check if the node for the given numerical ID is a supertype.

@JvmName(name = "isSupertype")
actual external fun isSupertype(symbol: UShort): Boolean

Check if the node for the given numerical ID is a supertype.

actual fun isSupertype(symbol: UShort): Boolean

Check if the node for the given numerical ID is a supertype.

Link copied to clipboard
@JvmName(name = "isVisible")
actual external fun isVisible(symbol: UShort): Boolean

Check if the node for the given numerical ID is visible.

expect fun isVisible(symbol: UShort): Boolean

Check if the node for the given numerical ID is visible.

@JvmName(name = "isVisible")
actual external fun isVisible(symbol: UShort): Boolean

Check if the node for the given numerical ID is visible.

actual fun isVisible(symbol: UShort): Boolean

Check if the node for the given numerical ID is visible.

Link copied to clipboard
@JvmName(name = "lookaheadIterator")
actual fun lookaheadIterator(state: UShort): LookaheadIterator

Create a new lookahead iterator for the given parse state.

Create a new lookahead iterator for the given parse state.

@JvmName(name = "lookaheadIterator")
actual fun lookaheadIterator(state: UShort): LookaheadIterator

Create a new lookahead iterator for the given parse state.

Create a new lookahead iterator for the given parse state.

Link copied to clipboard
@JvmName(name = "nextState")
actual external fun nextState(state: UShort, symbol: UShort): UShort

Get the next parse state.

expect fun nextState(state: UShort, symbol: UShort): UShort

Get the next parse state.

@JvmName(name = "nextState")
actual external fun nextState(state: UShort, symbol: UShort): UShort

Get the next parse state.

actual fun nextState(state: UShort, symbol: UShort): UShort

Get the next parse state.

Link copied to clipboard
actual fun query(source: String): Query

Create a new Query from a string containing one or more S-expression patterns.

expect fun query(source: String): Query

Create a new Query from a string containing one or more S-expression patterns.

actual fun query(source: String): Query

Create a new Query from a string containing one or more S-expression patterns.

actual fun query(source: String): Query

Create a new Query from a string containing one or more S-expression patterns.

Link copied to clipboard
@JvmName(name = "symbolForName")
actual external fun symbolForName(name: String, isNamed: Boolean): UShort

Get the numerical ID for the given node type.

expect fun symbolForName(name: String, isNamed: Boolean): UShort

Get the numerical ID for the given node type.

@JvmName(name = "symbolForName")
actual external fun symbolForName(name: String, isNamed: Boolean): UShort

Get the numerical ID for the given node type.

actual fun symbolForName(name: String, isNamed: Boolean): UShort

Get the numerical ID for the given node type.

Link copied to clipboard
@JvmName(name = "symbolName")
actual external fun symbolName(symbol: UShort): String?

Get the node type for the given numerical ID.

expect fun symbolName(symbol: UShort): String?

Get the node type for the given numerical ID.

@JvmName(name = "symbolName")
actual external fun symbolName(symbol: UShort): String?

Get the node type for the given numerical ID.

actual fun symbolName(symbol: UShort): String?

Get the node type for the given numerical ID.

toString
Link copied to clipboard
open override fun toString(): String
open override fun toString(): String
open override fun toString(): String