Debian Codegraph @

packages/babel-parser/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/invalid-pattern-with-method/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":11,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":11,"index":11}},
4 "errors": [
5 "SyntaxError: Object pattern can't contain methods. (1:2)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":11,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":11,"index":11}},
10 "sourceType": "script",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "ExpressionStatement",
15 "start":0,"end":11,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":11,"index":11}},
16 "expression": {
17 "type": "AssignmentExpression",
18 "start":1,"end":10,"loc":{"start":{"line":1,"column":1,"index":1},"end":{"line":1,"column":10,"index":10}},
19 "operator": "=",
20 "left": {
21 "type": "ObjectPattern",
22 "start":1,"end":8,"loc":{"start":{"line":1,"column":1,"index":1},"end":{"line":1,"column":8,"index":8}},
23 "properties": [
24 {
25 "type": "ObjectMethod",
26 "start":2,"end":7,"loc":{"start":{"line":1,"column":2,"index":2},"end":{"line":1,"column":7,"index":7}},
27 "method": true,
28 "key": {
29 "type": "Identifier",
30 "start":2,"end":3,"loc":{"start":{"line":1,"column":2,"index":2},"end":{"line":1,"column":3,"index":3},"identifierName":"a"},
31 "name": "a"
32 },
33 "computed": false,
34 "kind": "method",
35 "id": null,
36 "generator": false,
37 "async": false,
38 "params": [],
39 "body": {
40 "type": "BlockStatement",
41 "start":5,"end":7,"loc":{"start":{"line":1,"column":5,"index":5},"end":{"line":1,"column":7,"index":7}},
42 "body": [],
43 "directives": []
44 }
45 }
46 ]
47 },
48 "right": {
49 "type": "NumericLiteral",
50 "start":9,"end":10,"loc":{"start":{"line":1,"column":9,"index":9},"end":{"line":1,"column":10,"index":10}},
51 "extra": {
52 "rawValue": 0,
53 "raw": "0"
54 },
55 "value": 0
56 },
57 "extra": {
58 "parenthesized": true,
59 "parenStart": 0
60 }
61 }
62 }
63 ],
64 "directives": []
65 }
66 }