wasm: Fix infinite loop in Node.text when tree and text are out-of-sync

This commit is contained in:
Max Brunsfeld 2019-07-31 13:55:15 -07:00
parent 9e1649d9f8
commit 9848ceb3e2
2 changed files with 22 additions and 11 deletions

View file

@ -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;