1
|
import { CompileIdentifierMetadata } from './compile_metadata';
|
2
|
export declare class ParseLocation {
|
3
|
file: ParseSourceFile;
|
4
|
offset: number;
|
5
|
line: number;
|
6
|
col: number;
|
7
|
constructor(file: ParseSourceFile, offset: number, line: number, col: number);
|
8
|
toString(): string;
|
9
|
moveBy(delta: number): ParseLocation;
|
10
|
getContext(maxChars: number, maxLines: number): {
|
11
|
before: string;
|
12
|
after: string;
|
13
|
} | null;
|
14
|
}
|
15
|
export declare class ParseSourceFile {
|
16
|
content: string;
|
17
|
url: string;
|
18
|
constructor(content: string, url: string);
|
19
|
}
|
20
|
export declare class ParseSourceSpan {
|
21
|
start: ParseLocation;
|
22
|
end: ParseLocation;
|
23
|
details: string | null;
|
24
|
constructor(start: ParseLocation, end: ParseLocation, details?: string | null);
|
25
|
toString(): string;
|
26
|
}
|
27
|
export declare enum ParseErrorLevel {
|
28
|
WARNING = 0,
|
29
|
ERROR = 1,
|
30
|
}
|
31
|
export declare class ParseError {
|
32
|
span: ParseSourceSpan;
|
33
|
msg: string;
|
34
|
level: ParseErrorLevel;
|
35
|
constructor(span: ParseSourceSpan, msg: string, level?: ParseErrorLevel);
|
36
|
contextualMessage(): string;
|
37
|
toString(): string;
|
38
|
}
|
39
|
export declare function typeSourceSpan(kind: string, type: CompileIdentifierMetadata): ParseSourceSpan;
|