Debian Codegraph @

packages/babel-parser/test/fixtures/jsx/errors/attribute-sequence-expression/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":55,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":55,"index":55}},
4 "errors": [
5 "SyntaxError: Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)? (1:30)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":55,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":55,"index":55}},
10 "sourceType": "script",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "ExpressionStatement",
15 "start":0,"end":55,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":55,"index":55}},
16 "expression": {
17 "type": "JSXElement",
18 "start":0,"end":55,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":55,"index":55}},
19 "openingElement": {
20 "type": "JSXOpeningElement",
21 "start":0,"end":55,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":55,"index":55}},
22 "name": {
23 "type": "JSXIdentifier",
24 "start":1,"end":4,"loc":{"start":{"line":1,"column":1,"index":1},"end":{"line":1,"column":4,"index":4}},
25 "name": "div"
26 },
27 "attributes": [
28 {
29 "type": "JSXAttribute",
30 "start":5,"end":52,"loc":{"start":{"line":1,"column":5,"index":5},"end":{"line":1,"column":52,"index":52}},
31 "name": {
32 "type": "JSXIdentifier",
33 "start":5,"end":8,"loc":{"start":{"line":1,"column":5,"index":5},"end":{"line":1,"column":8,"index":8}},
34 "name": "key"
35 },
36 "value": {
37 "type": "JSXExpressionContainer",
38 "start":9,"end":52,"loc":{"start":{"line":1,"column":9,"index":9},"end":{"line":1,"column":52,"index":52}},
39 "expression": {
40 "type": "SequenceExpression",
41 "start":10,"end":51,"loc":{"start":{"line":1,"column":10,"index":10},"end":{"line":1,"column":51,"index":51}},
42 "expressions": [
43 {
44 "type": "CallExpression",
45 "start":10,"end":28,"loc":{"start":{"line":1,"column":10,"index":10},"end":{"line":1,"column":28,"index":28}},
46 "callee": {
47 "type": "MemberExpression",
48 "start":10,"end":21,"loc":{"start":{"line":1,"column":10,"index":10},"end":{"line":1,"column":21,"index":21}},
49 "object": {
50 "type": "Identifier",
51 "start":10,"end":17,"loc":{"start":{"line":1,"column":10,"index":10},"end":{"line":1,"column":17,"index":17},"identifierName":"console"},
52 "name": "console"
53 },
54 "computed": false,
55 "property": {
56 "type": "Identifier",
57 "start":18,"end":21,"loc":{"start":{"line":1,"column":18,"index":18},"end":{"line":1,"column":21,"index":21},"identifierName":"log"},
58 "name": "log"
59 }
60 },
61 "arguments": [
62 {
63 "type": "StringLiteral",
64 "start":22,"end":27,"loc":{"start":{"line":1,"column":22,"index":22},"end":{"line":1,"column":27,"index":27}},
65 "extra": {
66 "rawValue": "foo",
67 "raw": "'foo'"
68 },
69 "value": "foo"
70 }
71 ]
72 },
73 {
74 "type": "CallExpression",
75 "start":30,"end":51,"loc":{"start":{"line":1,"column":30,"index":30},"end":{"line":1,"column":51,"index":51}},
76 "callee": {
77 "type": "MemberExpression",
78 "start":30,"end":44,"loc":{"start":{"line":1,"column":30,"index":30},"end":{"line":1,"column":44,"index":44}},
79 "object": {
80 "type": "Identifier",
81 "start":30,"end":34,"loc":{"start":{"line":1,"column":30,"index":30},"end":{"line":1,"column":34,"index":34},"identifierName":"JSON"},
82 "name": "JSON"
83 },
84 "computed": false,
85 "property": {
86 "type": "Identifier",
87 "start":35,"end":44,"loc":{"start":{"line":1,"column":35,"index":35},"end":{"line":1,"column":44,"index":44},"identifierName":"stringify"},
88 "name": "stringify"
89 }
90 },
91 "arguments": [
92 {
93 "type": "Identifier",
94 "start":45,"end":50,"loc":{"start":{"line":1,"column":45,"index":45},"end":{"line":1,"column":50,"index":50},"identifierName":"props"},
95 "name": "props"
96 }
97 ]
98 }
99 ]
100 }
101 }
102 }
103 ],
104 "selfClosing": true
105 },
106 "closingElement": null,
107 "children": []
108 }
109 }
110 ],
111 "directives": []
112 }
113 }