Debian Codegraph @

packages/babel-parser/test/fixtures/es2015/object/invalid-property-initializer-1/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":44,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":4,"column":2,"index":44}},
4 "errors": [
5 "SyntaxError: Invalid shorthand property initializer. (3:6)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":44,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":4,"column":2,"index":44}},
10 "sourceType": "script",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "VariableDeclaration",
15 "start":0,"end":44,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":4,"column":2,"index":44}},
16 "declarations": [
17 {
18 "type": "VariableDeclarator",
19 "start":6,"end":43,"loc":{"start":{"line":1,"column":6,"index":6},"end":{"line":4,"column":1,"index":43}},
20 "id": {
21 "type": "Identifier",
22 "start":6,"end":9,"loc":{"start":{"line":1,"column":6,"index":6},"end":{"line":1,"column":9,"index":9},"identifierName":"obj"},
23 "name": "obj"
24 },
25 "init": {
26 "type": "ObjectExpression",
27 "start":12,"end":43,"loc":{"start":{"line":1,"column":12,"index":12},"end":{"line":4,"column":1,"index":43}},
28 "properties": [
29 {
30 "type": "ObjectProperty",
31 "start":16,"end":28,"loc":{"start":{"line":2,"column":2,"index":16},"end":{"line":2,"column":14,"index":28}},
32 "method": false,
33 "key": {
34 "type": "Identifier",
35 "start":16,"end":19,"loc":{"start":{"line":2,"column":2,"index":16},"end":{"line":2,"column":5,"index":19},"identifierName":"bar"},
36 "name": "bar"
37 },
38 "computed": false,
39 "shorthand": false,
40 "value": {
41 "type": "AssignmentExpression",
42 "start":21,"end":28,"loc":{"start":{"line":2,"column":7,"index":21},"end":{"line":2,"column":14,"index":28}},
43 "operator": "=",
44 "left": {
45 "type": "Identifier",
46 "start":21,"end":22,"loc":{"start":{"line":2,"column":7,"index":21},"end":{"line":2,"column":8,"index":22},"identifierName":"x"},
47 "name": "x"
48 },
49 "right": {
50 "type": "NumericLiteral",
51 "start":25,"end":28,"loc":{"start":{"line":2,"column":11,"index":25},"end":{"line":2,"column":14,"index":28}},
52 "extra": {
53 "rawValue": 123,
54 "raw": "123"
55 },
56 "value": 123
57 }
58 }
59 },
60 {
61 "type": "ObjectProperty",
62 "start":32,"end":41,"loc":{"start":{"line":3,"column":2,"index":32},"end":{"line":3,"column":11,"index":41}},
63 "method": false,
64 "key": {
65 "type": "Identifier",
66 "start":32,"end":35,"loc":{"start":{"line":3,"column":2,"index":32},"end":{"line":3,"column":5,"index":35},"identifierName":"foo"},
67 "name": "foo"
68 },
69 "computed": false,
70 "shorthand": true,
71 "value": {
72 "type": "AssignmentPattern",
73 "start":32,"end":41,"loc":{"start":{"line":3,"column":2,"index":32},"end":{"line":3,"column":11,"index":41}},
74 "left": {
75 "type": "Identifier",
76 "start":32,"end":35,"loc":{"start":{"line":3,"column":2,"index":32},"end":{"line":3,"column":5,"index":35},"identifierName":"foo"},
77 "name": "foo"
78 },
79 "right": {
80 "type": "NumericLiteral",
81 "start":38,"end":41,"loc":{"start":{"line":3,"column":8,"index":38},"end":{"line":3,"column":11,"index":41}},
82 "extra": {
83 "rawValue": 123,
84 "raw": "123"
85 },
86 "value": 123
87 }
88 },
89 "extra": {
90 "shorthand": true
91 }
92 }
93 ]
94 }
95 }
96 ],
97 "kind": "const"
98 }
99 ],
100 "directives": []
101 }
102 }