Debian Codegraph @

packages/babel-parser/test/fixtures/esprima/expression-conditional/migrated_0002/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":15,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":15,"index":15}},
4 "program": {
5 "type": "Program",
6 "start":0,"end":15,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":15,"index":15}},
7 "sourceType": "script",
8 "interpreter": null,
9 "body": [
10 {
11 "type": "ExpressionStatement",
12 "start":0,"end":15,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":15,"index":15}},
13 "expression": {
14 "type": "AssignmentExpression",
15 "start":0,"end":15,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":15,"index":15}},
16 "operator": "=",
17 "left": {
18 "type": "Identifier",
19 "start":0,"end":1,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":1,"index":1},"identifierName":"x"},
20 "name": "x"
21 },
22 "right": {
23 "type": "ConditionalExpression",
24 "start":4,"end":15,"loc":{"start":{"line":1,"column":4,"index":4},"end":{"line":1,"column":15,"index":15}},
25 "test": {
26 "type": "NumericLiteral",
27 "start":5,"end":6,"loc":{"start":{"line":1,"column":5,"index":5},"end":{"line":1,"column":6,"index":6}},
28 "extra": {
29 "rawValue": 0,
30 "raw": "0",
31 "parenthesized": true,
32 "parenStart": 4
33 },
34 "value": 0
35 },
36 "consequent": {
37 "type": "NumericLiteral",
38 "start":10,"end":11,"loc":{"start":{"line":1,"column":10,"index":10},"end":{"line":1,"column":11,"index":11}},
39 "extra": {
40 "rawValue": 1,
41 "raw": "1"
42 },
43 "value": 1
44 },
45 "alternate": {
46 "type": "NumericLiteral",
47 "start":14,"end":15,"loc":{"start":{"line":1,"column":14,"index":14},"end":{"line":1,"column":15,"index":15}},
48 "extra": {
49 "rawValue": 2,
50 "raw": "2"
51 },
52 "value": 2
53 }
54 }
55 }
56 }
57 ],
58 "directives": []
59 }
60 }