Debian Codegraph @

packages/babel-parser/test/fixtures/jsx/regression/1/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":40,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":40,"index":40}},
4 "program": {
5 "type": "Program",
6 "start":0,"end":40,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":40,"index":40}},
7 "sourceType": "script",
8 "interpreter": null,
9 "body": [
10 {
11 "type": "ExpressionStatement",
12 "start":0,"end":40,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":40,"index":40}},
13 "expression": {
14 "type": "JSXElement",
15 "start":0,"end":38,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":38,"index":38}},
16 "openingElement": {
17 "type": "JSXOpeningElement",
18 "start":0,"end":3,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":3,"index":3}},
19 "name": {
20 "type": "JSXIdentifier",
21 "start":1,"end":2,"loc":{"start":{"line":1,"column":1,"index":1},"end":{"line":1,"column":2,"index":2}},
22 "name": "p"
23 },
24 "attributes": [],
25 "selfClosing": false
26 },
27 "closingElement": {
28 "type": "JSXClosingElement",
29 "start":34,"end":38,"loc":{"start":{"line":1,"column":34,"index":34},"end":{"line":1,"column":38,"index":38}},
30 "name": {
31 "type": "JSXIdentifier",
32 "start":36,"end":37,"loc":{"start":{"line":1,"column":36,"index":36},"end":{"line":1,"column":37,"index":37}},
33 "name": "p"
34 }
35 },
36 "children": [
37 {
38 "type": "JSXText",
39 "start":3,"end":7,"loc":{"start":{"line":1,"column":3,"index":3},"end":{"line":1,"column":7,"index":7}},
40 "extra": {
41 "rawValue": "foo ",
42 "raw": "foo "
43 },
44 "value": "foo "
45 },
46 {
47 "type": "JSXElement",
48 "start":7,"end":30,"loc":{"start":{"line":1,"column":7,"index":7},"end":{"line":1,"column":30,"index":30}},
49 "openingElement": {
50 "type": "JSXOpeningElement",
51 "start":7,"end":22,"loc":{"start":{"line":1,"column":7,"index":7},"end":{"line":1,"column":22,"index":22}},
52 "name": {
53 "type": "JSXIdentifier",
54 "start":8,"end":9,"loc":{"start":{"line":1,"column":8,"index":8},"end":{"line":1,"column":9,"index":9}},
55 "name": "a"
56 },
57 "attributes": [
58 {
59 "type": "JSXAttribute",
60 "start":10,"end":21,"loc":{"start":{"line":1,"column":10,"index":10},"end":{"line":1,"column":21,"index":21}},
61 "name": {
62 "type": "JSXIdentifier",
63 "start":10,"end":14,"loc":{"start":{"line":1,"column":10,"index":10},"end":{"line":1,"column":14,"index":14}},
64 "name": "href"
65 },
66 "value": {
67 "type": "StringLiteral",
68 "start":15,"end":21,"loc":{"start":{"line":1,"column":15,"index":15},"end":{"line":1,"column":21,"index":21}},
69 "extra": {
70 "rawValue": "test",
71 "raw": "\"test\""
72 },
73 "value": "test"
74 }
75 }
76 ],
77 "selfClosing": false
78 },
79 "closingElement": {
80 "type": "JSXClosingElement",
81 "start":26,"end":30,"loc":{"start":{"line":1,"column":26,"index":26},"end":{"line":1,"column":30,"index":30}},
82 "name": {
83 "type": "JSXIdentifier",
84 "start":28,"end":29,"loc":{"start":{"line":1,"column":28,"index":28},"end":{"line":1,"column":29,"index":29}},
85 "name": "a"
86 }
87 },
88 "children": [
89 {
90 "type": "JSXText",
91 "start":22,"end":26,"loc":{"start":{"line":1,"column":22,"index":22},"end":{"line":1,"column":26,"index":26}},
92 "extra": {
93 "rawValue": " bar",
94 "raw": " bar"
95 },
96 "value": " bar"
97 }
98 ]
99 },
100 {
101 "type": "JSXText",
102 "start":30,"end":34,"loc":{"start":{"line":1,"column":30,"index":30},"end":{"line":1,"column":34,"index":34}},
103 "extra": {
104 "rawValue": " baz",
105 "raw": " baz"
106 },
107 "value": " baz"
108 }
109 ]
110 }
111 }
112 ],
113 "directives": []
114 }
115 }