Node

actual class Node(source)

A single node within a syntax tree.

expect class Node(source)

A single node within a syntax tree.

actual class Node(source)

A single node within a syntax tree.

actual class Node(source)

A single node within a syntax tree.

Properties

Link copied to clipboard
actual val byteRange: UIntRange

The range of the node in terms of bytes.

expect val byteRange: UIntRange

The range of the node in terms of bytes.

actual val byteRange: UIntRange

The range of the node in terms of bytes.

actual val byteRange: UIntRange

The range of the node in terms of bytes.

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

The number of this node's children.

expect val childCount: UInt

The number of this node's children.

@get:JvmName(name = "getChildCount")
actual val childCount: UInt

The number of this node's children.

actual val childCount: UInt

The number of this node's children.

Link copied to clipboard
actual val children: List<Node>

This node's children.

expect val children: List<Node>

This node's children.

actual val children: List<Node>

This node's children.

actual val children: List<Node>

This node's children.

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

The number of this node's descendants, including one for the node itself.

expect val descendantCount: UInt

The number of this node's descendants, including one for the node itself.

@get:JvmName(name = "getDescendantCount")
actual val descendantCount: UInt

The number of this node's descendants, including one for the node itself.

actual val descendantCount: UInt

The number of this node's descendants, including one for the node itself.

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

The end byte of the node.

expect val endByte: UInt

The end byte of the node.

@get:JvmName(name = "getEndByte")
actual val endByte: UInt

The end byte of the node.

actual val endByte: UInt

The end byte of the node.

Link copied to clipboard
actual val endPoint: Point

The end point of the node.

expect val endPoint: Point

The end point of the node.

actual val endPoint: Point

The end point of the node.

actual val endPoint: Point

The end point of the node.

Link copied to clipboard
@get:JvmName(name = "getGrammarSymbol")
actual val grammarSymbol: UShort

The numerical ID of the node's type, as it appears in the grammar ignoring aliases.

expect val grammarSymbol: UShort

The numerical ID of the node's type, as it appears in the grammar ignoring aliases.

@get:JvmName(name = "getGrammarSymbol")
actual val grammarSymbol: UShort

The numerical ID of the node's type, as it appears in the grammar ignoring aliases.

actual val grammarSymbol: UShort

The numerical ID of the node's type, as it appears in the grammar ignoring aliases.

Link copied to clipboard
actual val grammarType: String

The type of the node, as it appears in the grammar ignoring aliases.

expect val grammarType: String

The type of the node, as it appears in the grammar ignoring aliases.

actual val grammarType: String

The type of the node, as it appears in the grammar ignoring aliases.

actual val grammarType: String

The type of the node, as it appears in the grammar ignoring aliases.

Link copied to clipboard
@get:JvmName(name = "hasChanges")
actual val hasChanges: Boolean

Check if the node has been edited.

expect val hasChanges: Boolean

Check if the node has been edited.

@get:JvmName(name = "hasChanges")
actual val hasChanges: Boolean

Check if the node has been edited.

actual val hasChanges: Boolean

Check if the node has been edited.

Link copied to clipboard
@get:JvmName(name = "hasError")
actual val hasError: Boolean

Check if the node is a syntax error, or contains any syntax errors.

expect val hasError: Boolean

Check if the node is a syntax error, or contains any syntax errors.

@get:JvmName(name = "hasError")
actual val hasError: Boolean

Check if the node is a syntax error, or contains any syntax errors.

actual val hasError: Boolean

Check if the node is a syntax error, or contains any syntax errors.

Link copied to clipboard
@get:JvmName(name = "getId")
actual val id: ULong

The numeric ID of the node.

expect val id: ULong

The numeric ID of the node.

@get:JvmName(name = "getId")
actual val id: ULong

The numeric ID of the node.

actual val id: ULong

The numeric ID of the node.

Link copied to clipboard
actual val isError: Boolean

Check if the node is a syntax error.

expect val isError: Boolean

Check if the node is a syntax error.

actual val isError: Boolean

Check if the node is a syntax error.

actual val isError: Boolean

Check if the node is a syntax error.

Link copied to clipboard
actual val isExtra: Boolean

Check if the node is extra.

expect val isExtra: Boolean

Check if the node is extra.

actual val isExtra: Boolean

Check if the node is extra.

actual val isExtra: Boolean

Check if the node is extra.

Link copied to clipboard
actual val isMissing: Boolean

Check if the node is missing.

expect val isMissing: Boolean

Check if the node is missing.

actual val isMissing: Boolean

Check if the node is missing.

actual val isMissing: Boolean

Check if the node is missing.

Link copied to clipboard
actual val isNamed: Boolean

Check if the node is named.

expect val isNamed: Boolean

Check if the node is named.

actual val isNamed: Boolean

Check if the node is named.

actual val isNamed: Boolean

Check if the node is named.

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

The number of this node's named children.

expect val namedChildCount: UInt

The number of this node's named children.

@get:JvmName(name = "getNamedChildCount")
actual val namedChildCount: UInt

The number of this node's named children.

actual val namedChildCount: UInt

The number of this node's named children.

Link copied to clipboard
actual val namedChildren: List<Node>

This node's named children.

expect val namedChildren: List<Node>

This node's named children.

actual val namedChildren: List<Node>

This node's named children.

actual val namedChildren: List<Node>

This node's named children.

Link copied to clipboard
actual val nextNamedSibling: Node?

The node's next named sibling, if any.

expect val nextNamedSibling: Node?

The node's next named sibling, if any.

actual val nextNamedSibling: Node?

The node's next named sibling, if any.

actual val nextNamedSibling: Node?

The node's next named sibling, if any.

Link copied to clipboard
@get:JvmName(name = "getNextParseState")
actual val nextParseState: UShort

The parse state after this node.

The parse state after this node.

@get:JvmName(name = "getNextParseState")
actual val nextParseState: UShort

The parse state after this node.

The parse state after this node.

Link copied to clipboard
actual val nextSibling: Node?

The node's next sibling, if any.

expect val nextSibling: Node?

The node's next sibling, if any.

actual val nextSibling: Node?

The node's next sibling, if any.

actual val nextSibling: Node?

The node's next sibling, if any.

Link copied to clipboard
actual val parent: Node?

The node's immediate parent, if any.

expect val parent: Node?

The node's immediate parent, if any.

actual val parent: Node?

The node's immediate parent, if any.

actual val parent: Node?

The node's immediate parent, if any.

Link copied to clipboard
@get:JvmName(name = "getParseState")
actual val parseState: UShort

The parse state of this node.

expect val parseState: UShort

The parse state of this node.

@get:JvmName(name = "getParseState")
actual val parseState: UShort

The parse state of this node.

actual val parseState: UShort

The parse state of this node.

Link copied to clipboard
actual val prevNamedSibling: Node?

The node's previous named sibling, if any.

expect val prevNamedSibling: Node?

The node's previous named sibling, if any.

actual val prevNamedSibling: Node?

The node's previous named sibling, if any.

actual val prevNamedSibling: Node?

The node's previous named sibling, if any.

Link copied to clipboard
actual val prevSibling: Node?

The node's previous sibling, if any.

expect val prevSibling: Node?

The node's previous sibling, if any.

actual val prevSibling: Node?

The node's previous sibling, if any.

actual val prevSibling: Node?

The node's previous sibling, if any.

Link copied to clipboard
actual val range: Range

The range of the node in terms of bytes and points.

expect val range: Range

The range of the node in terms of bytes and points.

actual val range: Range

The range of the node in terms of bytes and points.

actual val range: Range

The range of the node in terms of bytes and points.

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

The start byte of the node.

expect val startByte: UInt

The start byte of the node.

@get:JvmName(name = "getStartByte")
actual val startByte: UInt

The start byte of the node.

actual val startByte: UInt

The start byte of the node.

Link copied to clipboard
actual val startPoint: Point

The start point of the node.

expect val startPoint: Point

The start point of the node.

actual val startPoint: Point

The start point of the node.

actual val startPoint: Point

The start point of the node.

Link copied to clipboard
@get:JvmName(name = "getSymbol")
actual val symbol: UShort

The numerical ID of the node's type.

expect val symbol: UShort

The numerical ID of the node's type.

@get:JvmName(name = "getSymbol")
actual val symbol: UShort

The numerical ID of the node's type.

actual val symbol: UShort

The numerical ID of the node's type.

Link copied to clipboard
actual val type: String

The type of the node.

expect val type: String

The type of the node.

actual val type: String

The type of the node.

actual val type: String

The type of the node.

Functions

Link copied to clipboard
@JvmName(name = "child")
actual external fun child(index: UInt): Node?

The node's child at the given index, if any.

expect fun child(index: UInt): Node?

The node's child at the given index, if any.

@JvmName(name = "child")
actual external fun child(index: UInt): Node?

The node's child at the given index, if any.

actual fun child(index: UInt): Node?

The node's child at the given index, if any.

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

Get the node's child with the given field ID, if any.

expect fun childByFieldId(id: UShort): Node?

Get the node's child with the given field ID, if any.

@JvmName(name = "childByFieldId")
actual external fun childByFieldId(id: UShort): Node?

Get the node's child with the given field ID, if any.

actual fun childByFieldId(id: UShort): Node?

Get the node's child with the given field ID, if any.

Link copied to clipboard
actual external fun childByFieldName(name: String): Node?

Get the node's child with the given field name, if any.

expect fun childByFieldName(name: String): Node?

Get the node's child with the given field name, if any.

actual external fun childByFieldName(name: String): Node?

Get the node's child with the given field name, if any.

actual fun childByFieldName(name: String): Node?

Get the node's child with the given field name, if any.

Link copied to clipboard
actual external fun childContainingDescendant(descendant: Node): Node?

Get the child of the node that contains the given descendant, if any.

expect fun childContainingDescendant(descendant: Node): Node?

Get the child of the node that contains the given descendant, if any.

actual external fun childContainingDescendant(descendant: Node): Node?

Get the child of the node that contains the given descendant, if any.

actual fun childContainingDescendant(descendant: Node): Node?

Get the child of the node that contains the given descendant, if any.

Link copied to clipboard
@JvmName(name = "childrenByFieldId")
actual external fun childrenByFieldId(id: UShort): List<Node>

Get a list of children with the given field ID.

expect fun childrenByFieldId(id: UShort): List<Node>

Get a list of children with the given field ID.

@JvmName(name = "childrenByFieldId")
actual external fun childrenByFieldId(id: UShort): List<Node>

Get a list of children with the given field ID.

actual fun childrenByFieldId(id: UShort): List<Node>

Get a list of children with the given field ID.

Link copied to clipboard
actual fun childrenByFieldName(name: String): List<Node>

Get a list of children with the given field name.

expect fun childrenByFieldName(name: String): List<Node>

Get a list of children with the given field name.

@JvmName(name = "childrenByFieldName")
actual fun childrenByFieldName(name: String): List<Node>

Get a list of children with the given field name.

actual fun childrenByFieldName(name: String): List<Node>

Get a list of children with the given field name.

Link copied to clipboard
actual external fun childWithDescendant(descendant: Node): Node?

Get the node that contains the given descendant, if any.

expect fun childWithDescendant(descendant: Node): Node?

Get the node that contains the given descendant, if any.

actual external fun childWithDescendant(descendant: Node): Node?

Get the node that contains the given descendant, if any.

actual fun childWithDescendant(descendant: Node): Node?

Get the node that contains the given descendant, if any.

Link copied to clipboard
actual external fun descendant(start: Point, end: Point): Node?

Get the smallest node within this node that spans the given point range, if any.

@JvmName(name = "descendant")
actual external fun descendant(start: UInt, end: UInt): Node?

Get the smallest node within this node that spans the given byte range, if any.

expect fun descendant(start: Point, end: Point): Node?

Get the smallest node within this node that spans the given point range, if any.

expect fun descendant(start: UInt, end: UInt): Node?

Get the smallest node within this node that spans the given byte range, if any.

actual external fun descendant(start: Point, end: Point): Node?

Get the smallest node within this node that spans the given point range, if any.

@JvmName(name = "descendant")
actual external fun descendant(start: UInt, end: UInt): Node?

Get the smallest node within this node that spans the given byte range, if any.

actual fun descendant(start: Point, end: Point): Node?

Get the smallest node within this node that spans the given point range, if any.

actual fun descendant(start: UInt, end: UInt): Node?

Get the smallest node within this node that spans the given byte range, if any.

Link copied to clipboard
actual external fun edit(edit: InputEdit)

Edit this node to keep it in-sync with source code that has been edited.

expect fun edit(edit: InputEdit)

Edit this node to keep it in-sync with source code that has been edited.

actual external fun edit(edit: InputEdit)

Edit this node to keep it in-sync with source code that has been edited.

Edit this node to keep it in-sync with source code that has been edited.

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 = "fieldNameForChild")
actual external fun fieldNameForChild(index: UInt): String?

Get the field name of this node’s child at the given index, if available.

expect fun fieldNameForChild(index: UInt): String?

Get the field name of this node’s child at the given index, if available.

@JvmName(name = "fieldNameForChild")
actual external fun fieldNameForChild(index: UInt): String?

Get the field name of this node’s child at the given index, if available.

actual fun fieldNameForChild(index: UInt): String?

Get the field name of this node’s child at the given index, if available.

Link copied to clipboard
@JvmName(name = "fieldNameForNamedChild")
actual external fun fieldNameForNamedChild(index: UInt): String?

Get the field name of this node’s named child at the given index, if available.

expect fun fieldNameForNamedChild(index: UInt): String?

Get the field name of this node’s named child at the given index, if available.

@JvmName(name = "fieldNameForNamedChild")
actual external fun fieldNameForNamedChild(index: UInt): String?

Get the field name of this node’s named child at the given index, if available.

actual fun fieldNameForNamedChild(index: UInt): String?

Get the field name of this node’s named child at the given index, if available.

Link copied to clipboard
actual open external override fun hashCode(): Int
expect open override fun hashCode(): Int
actual open external override fun hashCode(): Int
actual open override fun hashCode(): Int
Link copied to clipboard
@JvmName(name = "namedChild")
actual external fun namedChild(index: UInt): Node?

Get the node's named child at the given index, if any.

expect fun namedChild(index: UInt): Node?

Get the node's named child at the given index, if any.

@JvmName(name = "namedChild")
actual external fun namedChild(index: UInt): Node?

Get the node's named child at the given index, if any.

actual fun namedChild(index: UInt): Node?

Get the node's named child at the given index, if any.

Link copied to clipboard
actual external fun namedDescendant(start: Point, end: Point): Node?

Get the smallest named node within this node that spans the given point range, if any.

@JvmName(name = "namedDescendant")
actual external fun namedDescendant(start: UInt, end: UInt): Node?

Get the smallest named node within this node that spans the given byte range, if any.

expect fun namedDescendant(start: Point, end: Point): Node?

Get the smallest named node within this node that spans the given point range, if any.

expect fun namedDescendant(start: UInt, end: UInt): Node?

Get the smallest named node within this node that spans the given byte range, if any.

actual external fun namedDescendant(start: Point, end: Point): Node?

Get the smallest named node within this node that spans the given point range, if any.

@JvmName(name = "namedDescendant")
actual external fun namedDescendant(start: UInt, end: UInt): Node?

Get the smallest named node within this node that spans the given byte range, if any.

actual fun namedDescendant(start: Point, end: Point): Node?

Get the smallest named node within this node that spans the given point range, if any.

actual fun namedDescendant(start: UInt, end: UInt): Node?

Get the smallest named node within this node that spans the given byte range, if any.

Link copied to clipboard
actual external fun sexp(): String

Get the S-expression of the node.

expect fun sexp(): String

Get the S-expression of the node.

actual external fun sexp(): String

Get the S-expression of the node.

actual fun sexp(): String

Get the S-expression of the node.

Link copied to clipboard
actual fun text(): CharSequence?

Get the source code of the node, if available.

expect fun text(): CharSequence?

Get the source code of the node, if available.

actual fun text(): CharSequence?

Get the source code of the node, if available.

actual fun text(): CharSequence?

Get the source code of the node, if available.

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

Create a new tree cursor starting from this node.

expect fun walk(): TreeCursor

Create a new tree cursor starting from this node.

actual fun walk(): TreeCursor

Create a new tree cursor starting from this node.

actual fun walk(): TreeCursor

Create a new tree cursor starting from this node.