feat: add readonly modifier
This commit is contained in:
parent
eb5b0a5550
commit
17eba1f2aa
@ -4,9 +4,9 @@
|
|||||||
*/
|
*/
|
||||||
export interface CaretPosition {
|
export interface CaretPosition {
|
||||||
/** start at 1 */
|
/** start at 1 */
|
||||||
lineNumber: number;
|
readonly lineNumber: number;
|
||||||
/** start at 1 */
|
/** start at 1 */
|
||||||
column: number;
|
readonly column: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -45,23 +45,23 @@ export enum SyntaxContextType {
|
|||||||
|
|
||||||
export interface WordRange {
|
export interface WordRange {
|
||||||
/** content of word */
|
/** content of word */
|
||||||
text: string;
|
readonly text: string;
|
||||||
/** start at 0 */
|
/** start at 0 */
|
||||||
startIndex: number;
|
readonly startIndex: number;
|
||||||
stopIndex: number;
|
readonly stopIndex: number;
|
||||||
/** start at 1 */
|
/** start at 1 */
|
||||||
line: number;
|
readonly line: number;
|
||||||
/** start at 1 */
|
/** start at 1 */
|
||||||
startColumn: number;
|
readonly startColumn: number;
|
||||||
stopColumn: number;
|
readonly stopColumn: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Suggested information analyzed from the input
|
* Suggested information analyzed from the input
|
||||||
*/
|
*/
|
||||||
export interface SyntaxSuggestion<T = WordRange> {
|
export interface SyntaxSuggestion<T = WordRange> {
|
||||||
syntaxContextType: SyntaxContextType;
|
readonly syntaxContextType: SyntaxContextType;
|
||||||
wordRanges: T[];
|
readonly wordRanges: T[];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -71,22 +71,22 @@ export interface Suggestions<T = WordRange> {
|
|||||||
/**
|
/**
|
||||||
* Suggestions about syntax
|
* Suggestions about syntax
|
||||||
*/
|
*/
|
||||||
syntax: SyntaxSuggestion<T>[];
|
readonly syntax: SyntaxSuggestion<T>[];
|
||||||
/**
|
/**
|
||||||
* Suggestions about keywords
|
* Suggestions about keywords
|
||||||
*/
|
*/
|
||||||
keywords: string[];
|
readonly keywords: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface TextSlice {
|
export interface TextSlice {
|
||||||
/** start at 0 */
|
/** start at 0 */
|
||||||
startIndex: number;
|
readonly startIndex: number;
|
||||||
endIndex: number;
|
readonly endIndex: number;
|
||||||
/** start at 1 */
|
/** start at 1 */
|
||||||
startLine: number;
|
readonly startLine: number;
|
||||||
endLine: number;
|
readonly endLine: number;
|
||||||
/** start at 1 */
|
/** start at 1 */
|
||||||
startColumn: number;
|
readonly startColumn: number;
|
||||||
endColumn: number;
|
readonly endColumn: number;
|
||||||
text: string;
|
readonly text: string;
|
||||||
}
|
}
|
||||||
|
@ -5,23 +5,23 @@ import { ATNSimulator } from 'antlr4ts/atn/ATNSimulator';
|
|||||||
* Converted from {@link SyntaxError}.
|
* Converted from {@link SyntaxError}.
|
||||||
*/
|
*/
|
||||||
export interface ParseError {
|
export interface ParseError {
|
||||||
startLine: number;
|
readonly startLine: number;
|
||||||
endLine: number;
|
readonly endLine: number;
|
||||||
startCol: number;
|
readonly startCol: number;
|
||||||
endCol: number;
|
readonly endCol: number;
|
||||||
message: string;
|
readonly message: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The type of error resulting from lexical parsing and parsing.
|
* The type of error resulting from lexical parsing and parsing.
|
||||||
*/
|
*/
|
||||||
export interface SyntaxError<T> {
|
export interface SyntaxError<T> {
|
||||||
recognizer: Recognizer<T, ATNSimulator>;
|
readonly recognizer: Recognizer<T, ATNSimulator>;
|
||||||
offendingSymbol: Token;
|
readonly offendingSymbol: Token;
|
||||||
line: number;
|
readonly line: number;
|
||||||
charPositionInLine: number;
|
readonly charPositionInLine: number;
|
||||||
msg: string;
|
readonly msg: string;
|
||||||
e: RecognitionException;
|
readonly e: RecognitionException;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user