forked from github/codeql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprintDfg.ql
More file actions
35 lines (23 loc) · 1.03 KB
/
printDfg.ql
File metadata and controls
35 lines (23 loc) · 1.03 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
/**
* @name Print DFG
* @description Produces a representation of a file's data flow graph.
* This query is used by the VS Code extension.
* @id javascript/print-dfg
* @kind graph
* @tags ide-contextual-queries/print-dfg
*/
private import semmle.javascript.internal.unified.minimal.minimal
private import semmle.javascript.internal.unified.JSUnified
external string selectedSourceFile();
private predicate selectedSourceFileAlias = selectedSourceFile/0;
external int selectedSourceLine();
private predicate selectedSourceLineAlias = selectedSourceLine/0;
external int selectedSourceColumn();
private predicate selectedSourceColumnAlias = selectedSourceColumn/0;
module ViewDfgQueryInput implements ViewDfgQueryInputSig<File> {
predicate selectedSourceFile = selectedSourceFileAlias/0;
predicate selectedSourceLine = selectedSourceLineAlias/0;
predicate selectedSourceColumn = selectedSourceColumnAlias/0;
File getFileFromLocation(Location loc) { result = loc.getFile() }
}
import ViewDfgQuery<File, ViewDfgQueryInput>