chore(web): fix indentation in type files
This commit is contained in:
parent
42e2bba8d6
commit
912167a9cd
3 changed files with 114 additions and 114 deletions
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*
|
||||
|
|
|
|||
112
lib/binding_web/web-tree-sitter.d.ts
vendored
112
lib/binding_web/web-tree-sitter.d.ts
vendored
|
|
@ -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
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue