Debian Codegraph @

packages/babel-parser/test/fixtures/experimental/import-reflection/invalid-assertions/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":62,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":62,"index":62}},
4 "errors": [
5 "SyntaxError: `import module x` cannot have assertions. (1:14)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":62,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":62,"index":62}},
10 "sourceType": "module",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "ImportDeclaration",
15 "start":0,"end":62,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":62,"index":62}},
16 "specifiers": [
17 {
18 "type": "ImportDefaultSpecifier",
19 "start":14,"end":17,"loc":{"start":{"line":1,"column":14,"index":14},"end":{"line":1,"column":17,"index":17}},
20 "local": {
21 "type": "Identifier",
22 "start":14,"end":17,"loc":{"start":{"line":1,"column":14,"index":14},"end":{"line":1,"column":17,"index":17},"identifierName":"foo"},
23 "name": "foo"
24 }
25 }
26 ],
27 "module": true,
28 "source": {
29 "type": "StringLiteral",
30 "start":23,"end":38,"loc":{"start":{"line":1,"column":23,"index":23},"end":{"line":1,"column":38,"index":38}},
31 "extra": {
32 "rawValue": "./module.json",
33 "raw": "\"./module.json\""
34 },
35 "value": "./module.json"
36 },
37 "assertions": [
38 {
39 "type": "ImportAttribute",
40 "start":48,"end":60,"loc":{"start":{"line":1,"column":48,"index":48},"end":{"line":1,"column":60,"index":60}},
41 "key": {
42 "type": "Identifier",
43 "start":48,"end":52,"loc":{"start":{"line":1,"column":48,"index":48},"end":{"line":1,"column":52,"index":52},"identifierName":"type"},
44 "name": "type"
45 },
46 "value": {
47 "type": "StringLiteral",
48 "start":54,"end":60,"loc":{"start":{"line":1,"column":54,"index":54},"end":{"line":1,"column":60,"index":60}},
49 "extra": {
50 "rawValue": "json",
51 "raw": "\"json\""
52 },
53 "value": "json"
54 }
55 }
56 ]
57 }
58 ],
59 "directives": []
60 }
61 }