IScriptSnapshot

sealed external interface IScriptSnapshot(source)

Represents an immutable snapshot of a script at a specified time.Once acquired, the snapshot is observably immutable. i.e. the same calls with the same parameters will return the same values.

Properties

Link copied to clipboard
abstract val dispose: () -> Unit?

Releases all resources held by this script snapshot

Functions

Link copied to clipboard
abstract fun getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange?

Gets the TextChangeRange that describe how the text changed between this text and an older version. This information is used by the incremental parser to determine what sections of the script need to be re-parsed. 'undefined' can be returned if the change range cannot be determined. However, in that case, incremental parsing will not happen and the entire document will be re - parsed.

Link copied to clipboard
abstract fun getLength(): Double

Gets the length of this script snapshot.

Link copied to clipboard
abstract fun getText(start: Double, end: Double): String

Gets a portion of the script snapshot specified by [start, end).