Debian Codegraph @

packages/babel-parser/test/fixtures/es2022/module-string-names/string-exported-binding-without-from/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":45,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":45,"index":45}},
4 "errors": [
5 "SyntaxError: A string literal cannot be used as an exported binding without `from`.\n- Did you mean `export { '學而時習之,不亦說乎?' as '學而時習之,不亦說乎?' } from 'some-module'`? (1:9)",
6 "SyntaxError: A string literal cannot be used as an exported binding without `from`.\n- Did you mean `export { '吾道一以貫之。' as '忠恕。' } from 'some-module'`? (1:24)"
7 ],
8 "program": {
9 "type": "Program",
10 "start":0,"end":45,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":45,"index":45}},
11 "sourceType": "module",
12 "interpreter": null,
13 "body": [
14 {
15 "type": "ExportNamedDeclaration",
16 "start":0,"end":45,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":45,"index":45}},
17 "specifiers": [
18 {
19 "type": "ExportSpecifier",
20 "start":9,"end":22,"loc":{"start":{"line":1,"column":9,"index":9},"end":{"line":1,"column":22,"index":22}},
21 "local": {
22 "type": "StringLiteral",
23 "start":9,"end":22,"loc":{"start":{"line":1,"column":9,"index":9},"end":{"line":1,"column":22,"index":22}},
24 "extra": {
25 "rawValue": "學而時習之,不亦說乎?",
26 "raw": "\"學而時習之,不亦說乎?\""
27 },
28 "value": "學而時習之,不亦說乎?"
29 },
30 "exported": {
31 "type": "StringLiteral",
32 "start":9,"end":22,"loc":{"start":{"line":1,"column":9,"index":9},"end":{"line":1,"column":22,"index":22}},
33 "extra": {
34 "rawValue": "學而時習之,不亦說乎?",
35 "raw": "\"學而時習之,不亦說乎?\""
36 },
37 "value": "學而時習之,不亦說乎?"
38 }
39 },
40 {
41 "type": "ExportSpecifier",
42 "start":24,"end":42,"loc":{"start":{"line":1,"column":24,"index":24},"end":{"line":1,"column":42,"index":42}},
43 "local": {
44 "type": "StringLiteral",
45 "start":24,"end":33,"loc":{"start":{"line":1,"column":24,"index":24},"end":{"line":1,"column":33,"index":33}},
46 "extra": {
47 "rawValue": "吾道一以貫之。",
48 "raw": "\"吾道一以貫之。\""
49 },
50 "value": "吾道一以貫之。"
51 },
52 "exported": {
53 "type": "StringLiteral",
54 "start":37,"end":42,"loc":{"start":{"line":1,"column":37,"index":37},"end":{"line":1,"column":42,"index":42}},
55 "extra": {
56 "rawValue": "忠恕。",
57 "raw": "\"忠恕。\""
58 },
59 "value": "忠恕。"
60 }
61 }
62 ],
63 "source": null,
64 "declaration": null
65 }
66 ],
67 "directives": []
68 }
69 }