| 1 |
{ |
| 2 |
"type": "File", |
| 3 |
"start":0,"end":76,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":7,"column":1,"index":76}}, |
| 4 |
"errors": [ |
| 5 |
"SyntaxError: Decorators can't be used with a static block. (3:2)" |
| 6 |
], |
| 7 |
"program": { |
| 8 |
"type": "Program", |
| 9 |
"start":0,"end":76,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":7,"column":1,"index":76}}, |
| 10 |
"sourceType": "script", |
| 11 |
"interpreter": null, |
| 12 |
"body": [ |
| 13 |
{ |
| 14 |
"type": "ClassDeclaration", |
| 15 |
"start":0,"end":76,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":7,"column":1,"index":76}}, |
| 16 |
"id": { |
| 17 |
"type": "Identifier", |
| 18 |
"start":6,"end":7,"loc":{"start":{"line":1,"column":6,"index":6},"end":{"line":1,"column":7,"index":7},"identifierName":"C"}, |
| 19 |
"name": "C" |
| 20 |
}, |
| 21 |
"superClass": null, |
| 22 |
"body": { |
| 23 |
"type": "ClassBody", |
| 24 |
"start":8,"end":76,"loc":{"start":{"line":1,"column":8,"index":8},"end":{"line":7,"column":1,"index":76}}, |
| 25 |
"body": [ |
| 26 |
{ |
| 27 |
"type": "ClassMethod", |
| 28 |
"start":12,"end":27,"loc":{"start":{"line":2,"column":2,"index":12},"end":{"line":2,"column":17,"index":27}}, |
| 29 |
"static": true, |
| 30 |
"key": { |
| 31 |
"type": "Identifier", |
| 32 |
"start":19,"end":22,"loc":{"start":{"line":2,"column":9,"index":19},"end":{"line":2,"column":12,"index":22},"identifierName":"foo"}, |
| 33 |
"name": "foo" |
| 34 |
}, |
| 35 |
"computed": false, |
| 36 |
"kind": "method", |
| 37 |
"id": null, |
| 38 |
"generator": false, |
| 39 |
"async": false, |
| 40 |
"params": [], |
| 41 |
"body": { |
| 42 |
"type": "BlockStatement", |
| 43 |
"start":25,"end":27,"loc":{"start":{"line":2,"column":15,"index":25},"end":{"line":2,"column":17,"index":27}}, |
| 44 |
"body": [], |
| 45 |
"directives": [] |
| 46 |
} |
| 47 |
}, |
| 48 |
{ |
| 49 |
"type": "StaticBlock", |
| 50 |
"start":30,"end":74,"loc":{"start":{"line":3,"column":2,"index":30},"end":{"line":6,"column":3,"index":74}}, |
| 51 |
"decorators": [ |
| 52 |
{ |
| 53 |
"type": "Decorator", |
| 54 |
"start":30,"end":34,"loc":{"start":{"line":3,"column":2,"index":30},"end":{"line":3,"column":6,"index":34}}, |
| 55 |
"expression": { |
| 56 |
"type": "Identifier", |
| 57 |
"start":31,"end":34,"loc":{"start":{"line":3,"column":3,"index":31},"end":{"line":3,"column":6,"index":34},"identifierName":"dec"}, |
| 58 |
"name": "dec" |
| 59 |
} |
| 60 |
} |
| 61 |
], |
| 62 |
"body": [ |
| 63 |
{ |
| 64 |
"type": "ExpressionStatement", |
| 65 |
"start":50,"end":70,"loc":{"start":{"line":5,"column":4,"index":50},"end":{"line":5,"column":24,"index":70}}, |
| 66 |
"expression": { |
| 67 |
"type": "AssignmentExpression", |
| 68 |
"start":50,"end":69,"loc":{"start":{"line":5,"column":4,"index":50},"end":{"line":5,"column":23,"index":69}}, |
| 69 |
"operator": "=", |
| 70 |
"left": { |
| 71 |
"type": "MemberExpression", |
| 72 |
"start":50,"end":58,"loc":{"start":{"line":5,"column":4,"index":50},"end":{"line":5,"column":12,"index":58}}, |
| 73 |
"object": { |
| 74 |
"type": "ThisExpression", |
| 75 |
"start":50,"end":54,"loc":{"start":{"line":5,"column":4,"index":50},"end":{"line":5,"column":8,"index":54}} |
| 76 |
}, |
| 77 |
"computed": false, |
| 78 |
"property": { |
| 79 |
"type": "Identifier", |
| 80 |
"start":55,"end":58,"loc":{"start":{"line":5,"column":9,"index":55},"end":{"line":5,"column":12,"index":58},"identifierName":"bar"}, |
| 81 |
"name": "bar" |
| 82 |
} |
| 83 |
}, |
| 84 |
"right": { |
| 85 |
"type": "MemberExpression", |
| 86 |
"start":61,"end":69,"loc":{"start":{"line":5,"column":15,"index":61},"end":{"line":5,"column":23,"index":69}}, |
| 87 |
"object": { |
| 88 |
"type": "ThisExpression", |
| 89 |
"start":61,"end":65,"loc":{"start":{"line":5,"column":15,"index":61},"end":{"line":5,"column":19,"index":65}} |
| 90 |
}, |
| 91 |
"computed": false, |
| 92 |
"property": { |
| 93 |
"type": "Identifier", |
| 94 |
"start":66,"end":69,"loc":{"start":{"line":5,"column":20,"index":66},"end":{"line":5,"column":23,"index":69},"identifierName":"foo"}, |
| 95 |
"name": "foo" |
| 96 |
} |
| 97 |
} |
| 98 |
} |
| 99 |
} |
| 100 |
] |
| 101 |
} |
| 102 |
] |
| 103 |
} |
| 104 |
} |
| 105 |
], |
| 106 |
"directives": [] |
| 107 |
} |
| 108 |
} |