-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcontext.ts
More file actions
47 lines (41 loc) · 1.01 KB
/
context.ts
File metadata and controls
47 lines (41 loc) · 1.01 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
import { SourcePosition } from "./diagnostics";
// Type definitions used for LiquidJava context information
export type LJVariable = {
name: string;
internalName: string;
type: string;
refinement: string;
mainRefinement: string;
position: SourcePosition| null;
annotationPosition: SourcePosition | null;
}
export type LJGhost = {
name: string;
qualifiedName: string;
returnType: string;
parameterTypes: string[];
refinement: string;
isState: boolean;
file: string;
}
export type LJAlias = {
name: string;
parameters: string[];
types: string[];
predicate: string;
}
export type LJContext = {
localVars: LJVariable[];
globalVars: LJVariable[];
ghosts: LJGhost[];
aliases: LJAlias[];
visibleVars: LJVariable[]; // variables visible in the current selection
allVars: LJVariable[]; // instance vars + global vars + vars in scope
fileScopes: Record<string, Range[]>; // file -> scopes
}
export type Range = {
lineStart: number;
colStart: number;
lineEnd: number;
colEnd: number;
}