-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenv.d.ts
More file actions
51 lines (40 loc) · 1.08 KB
/
env.d.ts
File metadata and controls
51 lines (40 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import { ParserRuleContext } from "antlr4ng";
export interface ChicoryType {
toString(): string; // For easy debugging and hint display
}
type CompilationError = { message: string; context: ParserRuleContext };
type SyntaxError = { message: string; range: LspRange };
type LspRange = {
start: {
line: number;
character: number;
};
end: {
line: number;
character: number;
};
};
type LspDiagnostic = {
severity: number;
message: string;
range: LspRange;
source: string;
};
type TypeHintWithContext = {
context: ParserRuleContext;
type: string;
// message?: string; // Optional extra message
};
type TypeHint = {
range: LspRange;
type: string;
};
// Define the cache structure
type CompilationCacheEntry = {
exports: Map<string, ChicoryType>;
errors: CompilationError[];
// Potentially add other artifacts like generated prelude requirements
};
type CompilationCache = Map<string, CompilationCacheEntry>; // Key: absolute file path
type ProcessingFiles = Set<string>; // Key: absolute file path
type SubstitutionMap = Map<number, ChicoryType>;