/
output.json
203 lines (203 loc) 路 7.57 KB
/
output.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
{
"type": "File",
"start":0,"end":85,"loc":{"start":{"line":1,"column":0},"end":{"line":4,"column":18}},
"errors": [
"SyntaxError: A 'set' accessor must have exactly one formal parameter. (3:3)",
"SyntaxError: A 'get' accessor must not have any formal parameters. (4:3)"
],
"program": {
"type": "Program",
"start":0,"end":85,"loc":{"start":{"line":1,"column":0},"end":{"line":4,"column":18}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "ExpressionStatement",
"start":0,"end":20,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":20}},
"expression": {
"type": "ObjectExpression",
"start":1,"end":18,"loc":{"start":{"line":1,"column":1},"end":{"line":1,"column":18}},
"properties": [
{
"type": "Property",
"start":3,"end":16,"loc":{"start":{"line":1,"column":3},"end":{"line":1,"column":16}},
"method": false,
"key": {
"type": "Identifier",
"start":7,"end":8,"loc":{"start":{"line":1,"column":7},"end":{"line":1,"column":8},"identifierName":"x"},
"name": "x"
},
"computed": false,
"kind": "set",
"value": {
"type": "FunctionExpression",
"start":8,"end":16,"loc":{"start":{"line":1,"column":8},"end":{"line":1,"column":16}},
"id": null,
"generator": false,
"async": false,
"expression": false,
"params": [
{
"type": "Identifier",
"start":9,"end":12,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":12},"identifierName":"foo"},
"name": "foo"
}
],
"body": {
"type": "BlockStatement",
"start":14,"end":16,"loc":{"start":{"line":1,"column":14},"end":{"line":1,"column":16}},
"body": []
}
},
"shorthand": false
}
],
"extra": {
"parenthesized": true,
"parenStart": 0
}
}
},
{
"type": "ExpressionStatement",
"start":21,"end":48,"loc":{"start":{"line":2,"column":0},"end":{"line":2,"column":27}},
"expression": {
"type": "ObjectExpression",
"start":22,"end":46,"loc":{"start":{"line":2,"column":1},"end":{"line":2,"column":25}},
"properties": [
{
"type": "Property",
"start":24,"end":44,"loc":{"start":{"line":2,"column":3},"end":{"line":2,"column":23}},
"method": false,
"key": {
"type": "Identifier",
"start":28,"end":29,"loc":{"start":{"line":2,"column":7},"end":{"line":2,"column":8},"identifierName":"x"},
"name": "x"
},
"computed": false,
"kind": "get",
"value": {
"type": "FunctionExpression",
"start":29,"end":44,"loc":{"start":{"line":2,"column":8},"end":{"line":2,"column":23}},
"id": null,
"generator": false,
"async": false,
"expression": false,
"params": [],
"body": {
"type": "BlockStatement",
"start":32,"end":44,"loc":{"start":{"line":2,"column":11},"end":{"line":2,"column":23}},
"body": [
{
"type": "ReturnStatement",
"start":34,"end":42,"loc":{"start":{"line":2,"column":13},"end":{"line":2,"column":21}},
"argument": {
"type": "Literal",
"start":41,"end":42,"loc":{"start":{"line":2,"column":20},"end":{"line":2,"column":21}},
"value": 1,
"raw": "1"
}
}
]
}
},
"shorthand": false
}
],
"extra": {
"parenthesized": true,
"parenStart": 21
}
}
},
{
"type": "ExpressionStatement",
"start":49,"end":66,"loc":{"start":{"line":3,"column":0},"end":{"line":3,"column":17}},
"expression": {
"type": "ObjectExpression",
"start":50,"end":64,"loc":{"start":{"line":3,"column":1},"end":{"line":3,"column":15}},
"properties": [
{
"type": "Property",
"start":52,"end":62,"loc":{"start":{"line":3,"column":3},"end":{"line":3,"column":13}},
"method": false,
"key": {
"type": "Identifier",
"start":56,"end":57,"loc":{"start":{"line":3,"column":7},"end":{"line":3,"column":8},"identifierName":"x"},
"name": "x"
},
"computed": false,
"kind": "set",
"value": {
"type": "FunctionExpression",
"start":57,"end":62,"loc":{"start":{"line":3,"column":8},"end":{"line":3,"column":13}},
"id": null,
"generator": false,
"async": false,
"expression": false,
"params": [],
"body": {
"type": "BlockStatement",
"start":60,"end":62,"loc":{"start":{"line":3,"column":11},"end":{"line":3,"column":13}},
"body": []
}
},
"shorthand": false
}
],
"extra": {
"parenthesized": true,
"parenStart": 49
}
}
},
{
"type": "ExpressionStatement",
"start":67,"end":85,"loc":{"start":{"line":4,"column":0},"end":{"line":4,"column":18}},
"expression": {
"type": "ObjectExpression",
"start":68,"end":83,"loc":{"start":{"line":4,"column":1},"end":{"line":4,"column":16}},
"properties": [
{
"type": "Property",
"start":70,"end":81,"loc":{"start":{"line":4,"column":3},"end":{"line":4,"column":14}},
"method": false,
"key": {
"type": "Identifier",
"start":74,"end":75,"loc":{"start":{"line":4,"column":7},"end":{"line":4,"column":8},"identifierName":"x"},
"name": "x"
},
"computed": false,
"kind": "get",
"value": {
"type": "FunctionExpression",
"start":75,"end":81,"loc":{"start":{"line":4,"column":8},"end":{"line":4,"column":14}},
"id": null,
"generator": false,
"async": false,
"expression": false,
"params": [
{
"type": "Identifier",
"start":76,"end":77,"loc":{"start":{"line":4,"column":9},"end":{"line":4,"column":10},"identifierName":"x"},
"name": "x"
}
],
"body": {
"type": "BlockStatement",
"start":79,"end":81,"loc":{"start":{"line":4,"column":12},"end":{"line":4,"column":14}},
"body": []
}
},
"shorthand": false
}
],
"extra": {
"parenthesized": true,
"parenStart": 67
}
}
}
]
}
}