Files
codeql/ql/test/query-tests/analysis/Definitions.expected
Harry Maclean 95e2b8a4a4 Simplify jump-to-def query
The expected output format is a tuple (a, b, k) where `a` and `b` are any
`AstNode` subclass and `k` is a string indicating the kind of
definition (e.g. variable, method, ...).

By ensuring that every value in `DefLoc` is a subclass of `Expr` (itself
a subclass of `AstNode`) we can simplify the query by removing all the
use of `getLocation()`.
2021-08-31 15:42:05 +01:00

9 lines
607 B
Plaintext

| Definitions.rb:4:7:4:9 | call to g | Definitions.rb:7:5:9:7 | g | method |
| Definitions.rb:8:7:8:7 | x | Definitions.rb:7:11:7:11 | x | variable |
| Definitions.rb:12:7:12:7 | call to f | Definitions.rb:3:5:5:7 | f | method |
| Definitions.rb:20:7:20:7 | A | Definitions.rb:1:1:15:3 | A | constant |
| Definitions.rb:20:7:20:10 | B | Definitions.rb:2:3:14:5 | B | constant |
| Definitions.rb:20:18:20:18 | y | Definitions.rb:19:11:19:11 | y | variable |
| Definitions.rb:26:1:26:1 | C | Definitions.rb:17:1:24:3 | C | constant |
| Definitions.rb:26:1:26:4 | D | Definitions.rb:18:3:23:5 | D | constant |