Language

actual class Language(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(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(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(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.

Types

Link copied to clipboard
actual data class Metadata

A class containing the Language metadata.

expect class Metadata

A class containing the Language metadata.

actual data class Metadata

A class containing the Language metadata.

actual data class Metadata

A class containing the Language metadata.

Properties

Link copied to clipboard
@get:JvmName(name = "getAbiVersion")
actual external val abiVersion: UInt

The ABI version number for this language.

expect val abiVersion: UInt

The ABI version number for this language.

@get:JvmName(name = "getAbiVersion")
actual external val abiVersion: UInt

The ABI version number for this language.

actual val abiVersion: UInt

The ABI version number for this language.

Link copied to clipboard
@get:JvmName(name = "getFieldCount")
actual external 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 external 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
actual external val metadata: Language.Metadata?

The metadata of the language, if available.

The metadata of the language, if available.

actual external val metadata: Language.Metadata?

The metadata of the language, if available.

The metadata of the language, if available.

Link copied to clipboard
actual external val name: String?

The name of the language, if available.

expect val name: String?

The name of the language, if available.

actual external val name: String?

The name of the language, if available.

actual val name: String?

The name of the language, if available.

Link copied to clipboard
@get:JvmName(name = "getStateCount")
actual external 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 external 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 = "getSupertypes")
actual external val supertypes: UShortArray

The supertype symbols of the language.

The supertype symbols of the language.

@get:JvmName(name = "getSupertypes")
actual external val supertypes: UShortArray

The supertype symbols of the language.

The supertype symbols of the language.

Link copied to clipboard
@get:JvmName(name = "getSymbolCount")
actual external 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 external 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.

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 = "subtypes")
actual external fun subtypes(supertype: UShort): UShortArray

Get the subtype symbols for the given supertype symbol

expect fun subtypes(supertype: UShort): UShortArray

Get the subtype symbols for the given supertype symbol

@JvmName(name = "subtypes")
actual external fun subtypes(supertype: UShort): UShortArray

Get the subtype symbols for the given supertype symbol

actual fun subtypes(supertype: UShort): UShortArray

Get the subtype symbols for the given supertype symbol

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