SyntaxNode

interface SyntaxNode

Base element of the immutable concrete syntax tree.

Nodes retain syntactic distinctions such as parentheses and operator use. span and tokenRange are end-exclusive and contain every child range, but exclude surrounding trivia.

Inheritors

Properties

Link copied to clipboard
abstract val children: List<SyntaxNode>

Immediate syntax children in source order.

Link copied to clipboard
abstract val kind: SyntaxKind

Stable structural category of this node.

Link copied to clipboard
abstract val span: SourceSpan

End-exclusive range of source characters belonging to this node.

Link copied to clipboard
abstract val tokenRange: TokenRange

End-exclusive range of absolute token IDs belonging to this node.

Functions

Link copied to clipboard
open fun <T> accept(visitor: SyntaxNodeVisitor<T>): T

Dispatches this node to visitor.