-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcontext.ts
More file actions
41 lines (35 loc) · 836 Bytes
/
context.ts
File metadata and controls
41 lines (35 loc) · 836 Bytes
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
import { PlacementInCode } from "./diagnostics";
// Type definitions used for LiquidJava context information
export type Variable = {
name: string;
type: string;
refinement: string;
mainRefinement: string;
placementInCode: PlacementInCode | null;
}
export type Ghost = {
name: string;
qualifiedName: string;
returnType: string;
parameterTypes: string[];
refinement: string;
}
export type Alias = {
name: string;
parameters: string[];
types: string[];
predicate: string;
}
export type ContextHistory = {
vars: Record<string, Record<string, Variable[]>>; // file -> (scope -> variables in scope)
instanceVars: Variable[];
globalVars: Variable[];
ghosts: Ghost[];
aliases: Alias[];
}
export type Selection = {
startLine: number;
startColumn: number;
endLine: number;
endColumn: number;
}