JS: split SourceType.MODULE into two

This commit is contained in:
Asger F
2019-01-23 18:45:45 +00:00
parent f00b16e500
commit 30ba7aedfe
11 changed files with 29 additions and 11 deletions

View File

@@ -0,0 +1,3 @@
| a.js:5:31:5:31 | o |
| exports.js:3:9:3:15 | exports |
| tst.html:6:3:6:7 | alert |

View File

@@ -0,0 +1,5 @@
import javascript
from VarAccess access
where access.getVariable() instanceof GlobalVariable
select access

View File

@@ -1 +1,2 @@
| exports.js:1:8:1:17 | * as dummy |
| m/c.js:1:8:1:13 | * as b |

View File

@@ -1,6 +1,7 @@
| b.js:1:8:1:8 | f | b.js:1:8:1:8 | f |
| d.js:1:10:1:21 | default as g | d.js:1:21:1:21 | g |
| d.js:1:24:1:29 | x as y | d.js:1:29:1:29 | y |
| exports.js:1:8:1:17 | * as dummy | exports.js:1:13:1:17 | dummy |
| f.ts:1:8:1:8 | g | f.ts:1:8:1:8 | g |
| g.ts:1:9:1:11 | foo | g.ts:1:9:1:11 | foo |
| import-in-mjs.mjs:1:8:1:24 | exported_from_mjs | import-in-mjs.mjs:1:8:1:24 | exported_from_mjs |

View File

@@ -1,6 +1,7 @@
| b.js:1:1:1:20 | import f from './a'; | b.js:1:15:1:19 | './a' | 1 |
| d.js:1:1:1:43 | import ... './a'; | d.js:1:38:1:42 | './a' | 2 |
| d.js:2:1:2:13 | import './b'; | d.js:2:8:2:12 | './b' | 0 |
| exports.js:1:1:1:31 | import ... dummy'; | exports.js:1:24:1:30 | 'dummy' | 1 |
| f.ts:1:1:1:19 | import g from './e' | f.ts:1:15:1:19 | './e' | 1 |
| g.ts:1:1:1:23 | import ... m './f' | g.ts:1:19:1:23 | './f' | 1 |
| import-in-mjs.mjs:1:1:1:46 | import ... n-mjs'; | import-in-mjs.mjs:1:31:1:45 | 'export-in-mjs' | 1 |

View File

@@ -0,0 +1,4 @@
import * as dummy from 'dummy'; // Recognize as ES6 module
let x = exports; // global variable
x.foo();