Skip to content

LanguageState

Unofficial

Internal state for a language’s parser, tracking the parse tree and context.

Import:

import type { LanguageState } from '@obsidian-typings/obsidian-public-latest';

Signature:

export interface LanguageState

Properties

Property Type Description
context ParseContext A mutable parse state that is used to preserve work done during the lifetime of a state when moving to the next state.
tree LezerTree The current tree. Immutable, because directly accessible from the editor state.

Methods

Method Returns Description
apply(tr) LanguageState Apply a transaction to produce an updated language state.