TextDocument

data class TextDocument(val text: String, val cache: DocumentCache? = null, val setActive: TextDocument.() -> Unit = {})

An immutable representation of a text document that the user is working on.

Parameters

text

the content of the document

cache

precomputed cache for various attributes of the document, or null if missing

setActive

function to overwrite the active document with this instance for the same source URI

Constructors

Link copied to clipboard
constructor(text: String, cache: DocumentCache? = null, setActive: TextDocument.() -> Unit = {})

Properties

Link copied to clipboard
val cache: DocumentCache? = null
Link copied to clipboard

The pre-computed cache for the document if it exists; otherwise, computes and updates it invoking setActive.

Link copied to clipboard

The list of function calls from a TextDocument's cache, computing and updating the cache if necessary.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard