forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathslice.d.ts
More file actions
21 lines (21 loc) · 889 Bytes
/
slice.d.ts
File metadata and controls
21 lines (21 loc) · 889 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import { Location, Module } from './python-parser';
import { DataflowAnalyzer } from './data-flow';
import { NumberSet, Set } from './set';
export declare class LocationSet extends Set<Location> {
constructor(...items: Location[]);
}
export declare enum SliceDirection {
Forward = 0,
Backward = 1
}
/**
* More general slice: given locations of important syntax nodes, find locations of all relevant
* definitions. Locations can be mapped to lines later.
* seedLocations are symbol locations.
*/
export declare function slice(ast: Module, seedLocations?: LocationSet, dataflowAnalyzer?: DataflowAnalyzer, direction?: SliceDirection): LocationSet;
/**
* Slice: given a set of lines in a program, return lines it depends on.
* OUT OF DATE: use slice() instead of sliceLines().
*/
export declare function sliceLines(code: string, relevantLineNumbers: NumberSet): NumberSet;