wasm: Fix infinite loop in Node.text when tree and text are out-of-sync
This commit is contained in:
parent
9e1649d9f8
commit
9848ceb3e2
2 changed files with 22 additions and 11 deletions
9
lib/binding_web/tree-sitter-web.d.ts
vendored
9
lib/binding_web/tree-sitter-web.d.ts
vendored
|
|
@ -35,10 +35,11 @@ declare module 'web-tree-sitter' {
|
|||
type: "parse" | "lex"
|
||||
) => void;
|
||||
|
||||
export interface Input {
|
||||
seek(index: number): void;
|
||||
read(): any;
|
||||
}
|
||||
export type Input = (
|
||||
startIndex: number,
|
||||
startPoint?: Point,
|
||||
endIndex?: number,
|
||||
) => string | null;
|
||||
|
||||
export interface SyntaxNode {
|
||||
tree: Tree;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue