(
text: string,
extraParseOptions?: ParseOptions,
resetCursor: boolean = true,
)
| 210 | } |
| 211 | |
| 212 | async parseAndSet( |
| 213 | text: string, |
| 214 | extraParseOptions?: ParseOptions, |
| 215 | resetCursor: boolean = true, |
| 216 | ): Promise<{ set: boolean; parse: boolean }> { |
| 217 | const options = { |
| 218 | ...getStatusState().parseOptions, |
| 219 | ...extraParseOptions, |
| 220 | kind: this.kind, |
| 221 | }; |
| 222 | |
| 223 | reportTextSize(text.length); |
| 224 | const parsedTree = await this.worker().parseAndFormat(text, options); |
| 225 | const tree = this.setTree(parsedTree, resetCursor); |
| 226 | return { set: true, parse: tree.valid() }; |
| 227 | } |
| 228 | |
| 229 | listenOnChange() { |
| 230 | this.editor.onDidChangeModelContent(async (ev) => { |
no test coverage detected