diff --git a/lib/binding_web/src/constants.ts b/lib/binding_web/src/constants.ts index 44848142..eab198de 100644 --- a/lib/binding_web/src/constants.ts +++ b/lib/binding_web/src/constants.ts @@ -83,8 +83,8 @@ export const ZERO_POINT: Point = { row: 0, column: 0 }; export type ParseCallback = (index: number, position: Point) => string | undefined; /** - * A callback that receives the parse state during parsing. - */ + * A callback that receives the parse state during parsing. + */ export type ProgressCallback = (progress: ParseState) => boolean; /** diff --git a/lib/binding_web/web-tree-sitter.d.cts b/lib/binding_web/web-tree-sitter.d.cts index e826393c..7aa32dfb 100644 --- a/lib/binding_web/web-tree-sitter.d.cts +++ b/lib/binding_web/web-tree-sitter.d.cts @@ -1,60 +1,60 @@ declare module 'web-tree-sitter' { - /** - * A position in a multi-line text document, in terms of rows and columns. - * - * Rows and columns are zero-based. - */ - export interface Point { - /** The zero-based row number. */ - row: number; - /** The zero-based column number. */ - column: number; - } - /** - * A range of positions in a multi-line text document, both in terms of bytes - * and of rows and columns. - */ - export interface Range { - /** The start position of the range. */ - startPosition: Point; - /** The end position of the range. */ - endPosition: Point; - /** The start index of the range. */ - startIndex: number; - /** The end index of the range. */ - endIndex: number; - } - /** - * A summary of a change to a text document. - */ - export interface Edit { - /** The start position of the change. */ - startPosition: Point; - /** The end position of the change before the edit. */ - oldEndPosition: Point; - /** The end position of the change after the edit. */ - newEndPosition: Point; - /** The start index of the change. */ - startIndex: number; - /** The end index of the change before the edit. */ - oldEndIndex: number; - /** The end index of the change after the edit. */ - newEndIndex: number; - } - /** - * A callback for parsing that takes an index and point, and should return a string. - */ - export type ParseCallback = (index: number, position: Point) => string | undefined; - /** - * A callback that receives the parse state during parsing. - */ - export type ProgressCallback = (progress: ParseState) => boolean; - /** - * A callback for logging messages. - * - * If `isLex` is `true`, the message is from the lexer, otherwise it's from the parser. - */ - export type LogCallback = (message: string, isLex: boolean) => void; + /** + * A position in a multi-line text document, in terms of rows and columns. + * + * Rows and columns are zero-based. + */ + export interface Point { + /** The zero-based row number. */ + row: number; + /** The zero-based column number. */ + column: number; + } + /** + * A range of positions in a multi-line text document, both in terms of bytes + * and of rows and columns. + */ + export interface Range { + /** The start position of the range. */ + startPosition: Point; + /** The end position of the range. */ + endPosition: Point; + /** The start index of the range. */ + startIndex: number; + /** The end index of the range. */ + endIndex: number; + } + /** + * A summary of a change to a text document. + */ + export interface Edit { + /** The start position of the change. */ + startPosition: Point; + /** The end position of the change before the edit. */ + oldEndPosition: Point; + /** The end position of the change after the edit. */ + newEndPosition: Point; + /** The start index of the change. */ + startIndex: number; + /** The end index of the change before the edit. */ + oldEndIndex: number; + /** The end index of the change after the edit. */ + newEndIndex: number; + } + /** + * A callback for parsing that takes an index and point, and should return a string. + */ + export type ParseCallback = (index: number, position: Point) => string | undefined; + /** + * A callback that receives the parse state during parsing. + */ + export type ProgressCallback = (progress: ParseState) => boolean; + /** + * A callback for logging messages. + * + * If `isLex` is `true`, the message is from the lexer, otherwise it's from the parser. + */ + export type LogCallback = (message: string, isLex: boolean) => void; /** * Options for parsing * diff --git a/lib/binding_web/web-tree-sitter.d.ts b/lib/binding_web/web-tree-sitter.d.ts index ee8049ba..f984485e 100644 --- a/lib/binding_web/web-tree-sitter.d.ts +++ b/lib/binding_web/web-tree-sitter.d.ts @@ -1,60 +1,60 @@ declare module 'web-tree-sitter' { - /** - * A position in a multi-line text document, in terms of rows and columns. - * - * Rows and columns are zero-based. - */ - export interface Point { - /** The zero-based row number. */ - row: number; - /** The zero-based column number. */ - column: number; - } - /** - * A range of positions in a multi-line text document, both in terms of bytes - * and of rows and columns. - */ - export interface Range { - /** The start position of the range. */ - startPosition: Point; - /** The end position of the range. */ - endPosition: Point; - /** The start index of the range. */ - startIndex: number; - /** The end index of the range. */ - endIndex: number; - } - /** - * A summary of a change to a text document. - */ - export interface Edit { - /** The start position of the change. */ - startPosition: Point; - /** The end position of the change before the edit. */ - oldEndPosition: Point; - /** The end position of the change after the edit. */ - newEndPosition: Point; - /** The start index of the change. */ - startIndex: number; - /** The end index of the change before the edit. */ - oldEndIndex: number; - /** The end index of the change after the edit. */ - newEndIndex: number; - } - /** - * A callback for parsing that takes an index and point, and should return a string. - */ - export type ParseCallback = (index: number, position: Point) => string | undefined; - /** - * A callback that receives the parse state during parsing. - */ - export type ProgressCallback = (progress: ParseState) => boolean; - /** - * A callback for logging messages. - * - * If `isLex` is `true`, the message is from the lexer, otherwise it's from the parser. - */ - export type LogCallback = (message: string, isLex: boolean) => void; + /** + * A position in a multi-line text document, in terms of rows and columns. + * + * Rows and columns are zero-based. + */ + export interface Point { + /** The zero-based row number. */ + row: number; + /** The zero-based column number. */ + column: number; + } + /** + * A range of positions in a multi-line text document, both in terms of bytes + * and of rows and columns. + */ + export interface Range { + /** The start position of the range. */ + startPosition: Point; + /** The end position of the range. */ + endPosition: Point; + /** The start index of the range. */ + startIndex: number; + /** The end index of the range. */ + endIndex: number; + } + /** + * A summary of a change to a text document. + */ + export interface Edit { + /** The start position of the change. */ + startPosition: Point; + /** The end position of the change before the edit. */ + oldEndPosition: Point; + /** The end position of the change after the edit. */ + newEndPosition: Point; + /** The start index of the change. */ + startIndex: number; + /** The end index of the change before the edit. */ + oldEndIndex: number; + /** The end index of the change after the edit. */ + newEndIndex: number; + } + /** + * A callback for parsing that takes an index and point, and should return a string. + */ + export type ParseCallback = (index: number, position: Point) => string | undefined; + /** + * A callback that receives the parse state during parsing. + */ + export type ProgressCallback = (progress: ParseState) => boolean; + /** + * A callback for logging messages. + * + * If `isLex` is `true`, the message is from the lexer, otherwise it's from the parser. + */ + export type LogCallback = (message: string, isLex: boolean) => void; /** * Options for parsing *