Debian Codegraph @

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

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