Debian Codegraph @

packages/babel-parser/test/fixtures/experimental/module-attributes/valid-syntax-with-object-method-attribute/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":69,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":69,"index":69}},
4 "errors": [
5 "SyntaxError: The only accepted module attribute is `type`. (1:46)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":69,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":69,"index":69}},
10 "sourceType": "module",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "ImportDeclaration",
15 "start":0,"end":69,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":69,"index":69}},
16 "specifiers": [
17 {
18 "type": "ImportDefaultSpecifier",
19 "start":7,"end":10,"loc":{"start":{"line":1,"column":7,"index":7},"end":{"line":1,"column":10,"index":10}},
20 "local": {
21 "type": "Identifier",
22 "start":7,"end":10,"loc":{"start":{"line":1,"column":7,"index":7},"end":{"line":1,"column":10,"index":10},"identifierName":"foo"},
23 "name": "foo"
24 }
25 }
26 ],
27 "source": {
28 "type": "StringLiteral",
29 "start":16,"end":26,"loc":{"start":{"line":1,"column":16,"index":16},"end":{"line":1,"column":26,"index":26}},
30 "extra": {
31 "rawValue": "foo.json",
32 "raw": "\"foo.json\""
33 },
34 "value": "foo.json"
35 },
36 "attributes": [
37 {
38 "type": "ImportAttribute",
39 "start":32,"end":44,"loc":{"start":{"line":1,"column":32,"index":32},"end":{"line":1,"column":44,"index":44}},
40 "key": {
41 "type": "Identifier",
42 "start":32,"end":36,"loc":{"start":{"line":1,"column":32,"index":32},"end":{"line":1,"column":36,"index":36},"identifierName":"type"},
43 "name": "type"
44 },
45 "value": {
46 "type": "StringLiteral",
47 "start":38,"end":44,"loc":{"start":{"line":1,"column":38,"index":38},"end":{"line":1,"column":44,"index":44}},
48 "extra": {
49 "rawValue": "json",
50 "raw": "\"json\""
51 },
52 "value": "json"
53 }
54 },
55 {
56 "type": "ImportAttribute",
57 "start":46,"end":68,"loc":{"start":{"line":1,"column":46,"index":46},"end":{"line":1,"column":68,"index":68}},
58 "key": {
59 "type": "Identifier",
60 "start":46,"end":60,"loc":{"start":{"line":1,"column":46,"index":46},"end":{"line":1,"column":60,"index":60},"identifierName":"hasOwnProperty"},
61 "name": "hasOwnProperty"
62 },
63 "value": {
64 "type": "StringLiteral",
65 "start":62,"end":68,"loc":{"start":{"line":1,"column":62,"index":62},"end":{"line":1,"column":68,"index":68}},
66 "extra": {
67 "rawValue": "true",
68 "raw": "\"true\""
69 },
70 "value": "true"
71 }
72 }
73 ]
74 }
75 ],
76 "directives": []
77 }
78 }