NodeWeakMap

class NodeWeakMap<T>

Associates values with (syntax) nodes, using their identity as a key. In Kotlin/multiplatform we use a regular HashMap keyed by the backing Tree instance + position, since true WeakReferences aren't available cross-platform.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun cursorGet(cursor: TreeCursor): T?
Link copied to clipboard
fun cursorSet(cursor: TreeCursor, value: T)
Link copied to clipboard
fun get(node: SyntaxNode): T?
Link copied to clipboard
fun set(node: SyntaxNode, value: T)