Commit db0015a
committed
JS: Ignore ambience during extractor's variable resolution
Previously, ambient declarations were ignored during variable resolution in the extractor.
However, this makes it difficult to implement name/type resolution in QL, since ambient declaration can affect type checking.
Instead, the extractor's variable resolution no longer cares whether a given declaration is ambient.
The original behaviour was not particularly important to preserve since 'declare' can only appear at the top-level
or inside 'namespace' declarations.1 parent d9f73db commit db0015a
3 files changed
Lines changed: 22 additions & 8 deletions
File tree
- javascript
- extractor/src/com/semmle/js/extractor
- ql/test/ApiGraphs/typed
Lines changed: 1 addition & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
426 | 426 | | |
427 | 427 | | |
428 | 428 | | |
429 | | - | |
430 | 429 | | |
431 | 430 | | |
432 | 431 | | |
433 | 432 | | |
434 | 433 | | |
435 | 434 | | |
436 | 435 | | |
437 | | - | |
438 | 436 | | |
439 | 437 | | |
440 | 438 | | |
| |||
483 | 481 | | |
484 | 482 | | |
485 | 483 | | |
486 | | - | |
487 | 484 | | |
488 | 485 | | |
489 | 486 | | |
| |||
518 | 515 | | |
519 | 516 | | |
520 | 517 | | |
521 | | - | |
522 | | - | |
| 518 | + | |
523 | 519 | | |
524 | 520 | | |
525 | 521 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
5 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
6 | 24 | | |
7 | 25 | | |
8 | 26 | | |
9 | 27 | | |
10 | 28 | | |
11 | 29 | | |
| 30 | + | |
12 | 31 | | |
| 32 | + | |
| 33 | + | |
13 | 34 | | |
14 | 35 | | |
Lines changed: 0 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
0 commit comments