Debian Codegraph @

packages/babel-parser/test/fixtures/core/object/valid-property-initializer/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":68,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":4,"column":25,"index":68}},
4 "program": {
5 "type": "Program",
6 "start":0,"end":68,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":4,"column":25,"index":68}},
7 "sourceType": "script",
8 "interpreter": null,
9 "body": [
10 {
11 "type": "VariableDeclaration",
12 "start":0,"end":68,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":4,"column":25,"index":68}},
13 "declarations": [
14 {
15 "type": "VariableDeclarator",
16 "start":6,"end":67,"loc":{"start":{"line":1,"column":6,"index":6},"end":{"line":4,"column":24,"index":67}},
17 "id": {
18 "type": "Identifier",
19 "start":6,"end":9,"loc":{"start":{"line":1,"column":6,"index":6},"end":{"line":1,"column":9,"index":9},"identifierName":"obj"},
20 "name": "obj"
21 },
22 "init": {
23 "type": "AssignmentExpression",
24 "start":12,"end":67,"loc":{"start":{"line":1,"column":12,"index":12},"end":{"line":4,"column":24,"index":67}},
25 "operator": "=",
26 "left": {
27 "type": "ObjectPattern",
28 "start":12,"end":44,"loc":{"start":{"line":1,"column":12,"index":12},"end":{"line":4,"column":1,"index":44}},
29 "properties": [
30 {
31 "type": "ObjectProperty",
32 "start":16,"end":25,"loc":{"start":{"line":2,"column":2,"index":16},"end":{"line":2,"column":11,"index":25}},
33 "method": false,
34 "key": {
35 "type": "Identifier",
36 "start":16,"end":19,"loc":{"start":{"line":2,"column":2,"index":16},"end":{"line":2,"column":5,"index":19},"identifierName":"foo"},
37 "name": "foo"
38 },
39 "computed": false,
40 "shorthand": true,
41 "value": {
42 "type": "AssignmentPattern",
43 "start":16,"end":25,"loc":{"start":{"line":2,"column":2,"index":16},"end":{"line":2,"column":11,"index":25}},
44 "left": {
45 "type": "Identifier",
46 "start":16,"end":19,"loc":{"start":{"line":2,"column":2,"index":16},"end":{"line":2,"column":5,"index":19},"identifierName":"foo"},
47 "name": "foo"
48 },
49 "right": {
50 "type": "NumericLiteral",
51 "start":22,"end":25,"loc":{"start":{"line":2,"column":8,"index":22},"end":{"line":2,"column":11,"index":25}},
52 "extra": {
53 "rawValue": 123,
54 "raw": "123"
55 },
56 "value": 123
57 }
58 },
59 "extra": {
60 "shorthand": true
61 }
62 },
63 {
64 "type": "ObjectProperty",
65 "start":29,"end":41,"loc":{"start":{"line":3,"column":2,"index":29},"end":{"line":3,"column":14,"index":41}},
66 "method": false,
67 "key": {
68 "type": "Identifier",
69 "start":29,"end":32,"loc":{"start":{"line":3,"column":2,"index":29},"end":{"line":3,"column":5,"index":32},"identifierName":"bar"},
70 "name": "bar"
71 },
72 "computed": false,
73 "shorthand": false,
74 "value": {
75 "type": "AssignmentPattern",
76 "start":34,"end":41,"loc":{"start":{"line":3,"column":7,"index":34},"end":{"line":3,"column":14,"index":41}},
77 "left": {
78 "type": "Identifier",
79 "start":34,"end":35,"loc":{"start":{"line":3,"column":7,"index":34},"end":{"line":3,"column":8,"index":35},"identifierName":"x"},
80 "name": "x"
81 },
82 "right": {
83 "type": "NumericLiteral",
84 "start":38,"end":41,"loc":{"start":{"line":3,"column":11,"index":38},"end":{"line":3,"column":14,"index":41}},
85 "extra": {
86 "rawValue": 123,
87 "raw": "123"
88 },
89 "value": 123
90 }
91 }
92 }
93 ],
94 "extra": {
95 "trailingComma": 41
96 }
97 },
98 "right": {
99 "type": "ObjectExpression",
100 "start":47,"end":67,"loc":{"start":{"line":4,"column":4,"index":47},"end":{"line":4,"column":24,"index":67}},
101 "properties": [
102 {
103 "type": "ObjectProperty",
104 "start":49,"end":56,"loc":{"start":{"line":4,"column":6,"index":49},"end":{"line":4,"column":13,"index":56}},
105 "method": false,
106 "key": {
107 "type": "Identifier",
108 "start":49,"end":52,"loc":{"start":{"line":4,"column":6,"index":49},"end":{"line":4,"column":9,"index":52},"identifierName":"foo"},
109 "name": "foo"
110 },
111 "computed": false,
112 "shorthand": false,
113 "value": {
114 "type": "NumericLiteral",
115 "start":54,"end":56,"loc":{"start":{"line":4,"column":11,"index":54},"end":{"line":4,"column":13,"index":56}},
116 "extra": {
117 "rawValue": 24,
118 "raw": "24"
119 },
120 "value": 24
121 }
122 },
123 {
124 "type": "ObjectProperty",
125 "start":58,"end":65,"loc":{"start":{"line":4,"column":15,"index":58},"end":{"line":4,"column":22,"index":65}},
126 "method": false,
127 "key": {
128 "type": "Identifier",
129 "start":58,"end":61,"loc":{"start":{"line":4,"column":15,"index":58},"end":{"line":4,"column":18,"index":61},"identifierName":"bar"},
130 "name": "bar"
131 },
132 "computed": false,
133 "shorthand": false,
134 "value": {
135 "type": "NumericLiteral",
136 "start":63,"end":65,"loc":{"start":{"line":4,"column":20,"index":63},"end":{"line":4,"column":22,"index":65}},
137 "extra": {
138 "rawValue": 45,
139 "raw": "45"
140 },
141 "value": 45
142 }
143 }
144 ]
145 }
146 }
147 }
148 ],
149 "kind": "const"
150 }
151 ],
152 "directives": []
153 }
154 }