JavaScript: Copy over a test left in internal repo.

This test seems to have been accidentally committed into the old location in the internal repo.
This commit is contained in:
Max Schaefer
2018-10-24 08:39:22 +01:00
parent b1a463bf93
commit f103b1a371
2 changed files with 20 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
| tst.ts:122:19:122:32 | import("type") | type | type |
| tst.ts:123:26:123:39 | import("type") | type | type |
| tst.ts:124:28:124:46 | import("namespace") | namespace | namespace |
| tst.ts:125:35:125:53 | import("namespace") | namespace | namespace |
| tst.ts:126:28:126:42 | import("value") | value | value |
| tst.ts:127:37:127:51 | import("value") | value | value |
| tst.ts:128:38:130:3 | import( ... ce'\\n ) | awkard-namespace | namespace |

View File

@@ -0,0 +1,13 @@
import javascript
string getKind(ImportTypeExpr imprt) {
if imprt.isTypeAccess() then
result = "type"
else if imprt.isNamespaceAccess() then
result = "namespace"
else
result = "value"
}
from ImportTypeExpr imprt
select imprt, imprt.getPath(), getKind(imprt)