Debian Codegraph @

packages/babel-parser/test/fixtures/jsx/basic/3/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":40,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":40,"index":40}},
16 "openingElement": {
17 "type": "JSXOpeningElement",
18 "start":0,"end":15,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":15,"index":15}},
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": "a"
23 },
24 "attributes": [
25 {
26 "type": "JSXAttribute",
27 "start":3,"end":14,"loc":{"start":{"line":1,"column":3,"index":3},"end":{"line":1,"column":14,"index":14}},
28 "name": {
29 "type": "JSXNamespacedName",
30 "start":3,"end":8,"loc":{"start":{"line":1,"column":3,"index":3},"end":{"line":1,"column":8,"index":8}},
31 "namespace": {
32 "type": "JSXIdentifier",
33 "start":3,"end":4,"loc":{"start":{"line":1,"column":3,"index":3},"end":{"line":1,"column":4,"index":4}},
34 "name": "n"
35 },
36 "name": {
37 "type": "JSXIdentifier",
38 "start":5,"end":8,"loc":{"start":{"line":1,"column":5,"index":5},"end":{"line":1,"column":8,"index":8}},
39 "name": "foo"
40 }
41 },
42 "value": {
43 "type": "StringLiteral",
44 "start":9,"end":14,"loc":{"start":{"line":1,"column":9,"index":9},"end":{"line":1,"column":14,"index":14}},
45 "extra": {
46 "rawValue": "bar",
47 "raw": "\"bar\""
48 },
49 "value": "bar"
50 }
51 }
52 ],
53 "selfClosing": false
54 },
55 "closingElement": {
56 "type": "JSXClosingElement",
57 "start":36,"end":40,"loc":{"start":{"line":1,"column":36,"index":36},"end":{"line":1,"column":40,"index":40}},
58 "name": {
59 "type": "JSXIdentifier",
60 "start":38,"end":39,"loc":{"start":{"line":1,"column":38,"index":38},"end":{"line":1,"column":39,"index":39}},
61 "name": "a"
62 }
63 },
64 "children": [
65 {
66 "type": "JSXText",
67 "start":15,"end":16,"loc":{"start":{"line":1,"column":15,"index":15},"end":{"line":1,"column":16,"index":16}},
68 "extra": {
69 "rawValue": " ",
70 "raw": " "
71 },
72 "value": " "
73 },
74 {
75 "type": "JSXExpressionContainer",
76 "start":16,"end":23,"loc":{"start":{"line":1,"column":16,"index":16},"end":{"line":1,"column":23,"index":23}},
77 "expression": {
78 "type": "Identifier",
79 "start":17,"end":22,"loc":{"start":{"line":1,"column":17,"index":17},"end":{"line":1,"column":22,"index":22},"identifierName":"value"},
80 "name": "value"
81 }
82 },
83 {
84 "type": "JSXText",
85 "start":23,"end":24,"loc":{"start":{"line":1,"column":23,"index":23},"end":{"line":1,"column":24,"index":24}},
86 "extra": {
87 "rawValue": " ",
88 "raw": " "
89 },
90 "value": " "
91 },
92 {
93 "type": "JSXElement",
94 "start":24,"end":36,"loc":{"start":{"line":1,"column":24,"index":24},"end":{"line":1,"column":36,"index":36}},
95 "openingElement": {
96 "type": "JSXOpeningElement",
97 "start":24,"end":27,"loc":{"start":{"line":1,"column":24,"index":24},"end":{"line":1,"column":27,"index":27}},
98 "name": {
99 "type": "JSXIdentifier",
100 "start":25,"end":26,"loc":{"start":{"line":1,"column":25,"index":25},"end":{"line":1,"column":26,"index":26}},
101 "name": "b"
102 },
103 "attributes": [],
104 "selfClosing": false
105 },
106 "closingElement": {
107 "type": "JSXClosingElement",
108 "start":32,"end":36,"loc":{"start":{"line":1,"column":32,"index":32},"end":{"line":1,"column":36,"index":36}},
109 "name": {
110 "type": "JSXIdentifier",
111 "start":34,"end":35,"loc":{"start":{"line":1,"column":34,"index":34},"end":{"line":1,"column":35,"index":35}},
112 "name": "b"
113 }
114 },
115 "children": [
116 {
117 "type": "JSXElement",
118 "start":27,"end":32,"loc":{"start":{"line":1,"column":27,"index":27},"end":{"line":1,"column":32,"index":32}},
119 "openingElement": {
120 "type": "JSXOpeningElement",
121 "start":27,"end":32,"loc":{"start":{"line":1,"column":27,"index":27},"end":{"line":1,"column":32,"index":32}},
122 "name": {
123 "type": "JSXIdentifier",
124 "start":28,"end":29,"loc":{"start":{"line":1,"column":28,"index":28},"end":{"line":1,"column":29,"index":29}},
125 "name": "c"
126 },
127 "attributes": [],
128 "selfClosing": true
129 },
130 "closingElement": null,
131 "children": []
132 }
133 ]
134 }
135 ]
136 }
137 }
138 ],
139 "directives": []
140 }
141 }