| 1 |
{ |
| 2 |
"type": "File", |
| 3 |
"start":0,"end":60,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":2,"column":34,"index":60}}, |
| 4 |
"errors": [ |
| 5 |
"SyntaxError: Identifier 'foo' has already been declared. (2:20)", |
| 6 |
"SyntaxError: `foo` has already been exported. Exported identifiers must be unique. (2:20)" |
| 7 |
], |
| 8 |
"program": { |
| 9 |
"type": "Program", |
| 10 |
"start":0,"end":60,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":2,"column":34,"index":60}}, |
| 11 |
"sourceType": "module", |
| 12 |
"interpreter": null, |
| 13 |
"body": [ |
| 14 |
{ |
| 15 |
"type": "ExportNamedDeclaration", |
| 16 |
"start":0,"end":24,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":24,"index":24}}, |
| 17 |
"specifiers": [], |
| 18 |
"source": null, |
| 19 |
"declaration": { |
| 20 |
"type": "FunctionDeclaration", |
| 21 |
"start":7,"end":24,"loc":{"start":{"line":1,"column":7,"index":7},"end":{"line":1,"column":24,"index":24}}, |
| 22 |
"id": { |
| 23 |
"type": "Identifier", |
| 24 |
"start":16,"end":19,"loc":{"start":{"line":1,"column":16,"index":16},"end":{"line":1,"column":19,"index":19},"identifierName":"foo"}, |
| 25 |
"name": "foo" |
| 26 |
}, |
| 27 |
"generator": false, |
| 28 |
"async": false, |
| 29 |
"params": [], |
| 30 |
"body": { |
| 31 |
"type": "BlockStatement", |
| 32 |
"start":22,"end":24,"loc":{"start":{"line":1,"column":22,"index":22},"end":{"line":1,"column":24,"index":24}}, |
| 33 |
"body": [], |
| 34 |
"directives": [] |
| 35 |
} |
| 36 |
} |
| 37 |
}, |
| 38 |
{ |
| 39 |
"type": "EmptyStatement", |
| 40 |
"start":24,"end":25,"loc":{"start":{"line":1,"column":24,"index":24},"end":{"line":1,"column":25,"index":25}} |
| 41 |
}, |
| 42 |
{ |
| 43 |
"type": "ExportNamedDeclaration", |
| 44 |
"start":26,"end":60,"loc":{"start":{"line":2,"column":0,"index":26},"end":{"line":2,"column":34,"index":60}}, |
| 45 |
"specifiers": [], |
| 46 |
"source": null, |
| 47 |
"declaration": { |
| 48 |
"type": "VariableDeclaration", |
| 49 |
"start":33,"end":60,"loc":{"start":{"line":2,"column":7,"index":33},"end":{"line":2,"column":34,"index":60}}, |
| 50 |
"declarations": [ |
| 51 |
{ |
| 52 |
"type": "VariableDeclarator", |
| 53 |
"start":39,"end":59,"loc":{"start":{"line":2,"column":13,"index":39},"end":{"line":2,"column":33,"index":59}}, |
| 54 |
"id": { |
| 55 |
"type": "ObjectPattern", |
| 56 |
"start":39,"end":53,"loc":{"start":{"line":2,"column":13,"index":39},"end":{"line":2,"column":27,"index":53}}, |
| 57 |
"properties": [ |
| 58 |
{ |
| 59 |
"type": "ObjectProperty", |
| 60 |
"start":41,"end":51,"loc":{"start":{"line":2,"column":15,"index":41},"end":{"line":2,"column":25,"index":51}}, |
| 61 |
"key": { |
| 62 |
"type": "Identifier", |
| 63 |
"start":41,"end":42,"loc":{"start":{"line":2,"column":15,"index":41},"end":{"line":2,"column":16,"index":42},"identifierName":"a"}, |
| 64 |
"name": "a" |
| 65 |
}, |
| 66 |
"computed": false, |
| 67 |
"method": false, |
| 68 |
"shorthand": false, |
| 69 |
"value": { |
| 70 |
"type": "ArrayPattern", |
| 71 |
"start":44,"end":51,"loc":{"start":{"line":2,"column":18,"index":44},"end":{"line":2,"column":25,"index":51}}, |
| 72 |
"elements": [ |
| 73 |
{ |
| 74 |
"type": "ObjectPattern", |
| 75 |
"start":45,"end":50,"loc":{"start":{"line":2,"column":19,"index":45},"end":{"line":2,"column":24,"index":50}}, |
| 76 |
"properties": [ |
| 77 |
{ |
| 78 |
"type": "ObjectProperty", |
| 79 |
"start":46,"end":49,"loc":{"start":{"line":2,"column":20,"index":46},"end":{"line":2,"column":23,"index":49}}, |
| 80 |
"key": { |
| 81 |
"type": "Identifier", |
| 82 |
"start":46,"end":49,"loc":{"start":{"line":2,"column":20,"index":46},"end":{"line":2,"column":23,"index":49},"identifierName":"foo"}, |
| 83 |
"name": "foo" |
| 84 |
}, |
| 85 |
"computed": false, |
| 86 |
"method": false, |
| 87 |
"shorthand": true, |
| 88 |
"value": { |
| 89 |
"type": "Identifier", |
| 90 |
"start":46,"end":49,"loc":{"start":{"line":2,"column":20,"index":46},"end":{"line":2,"column":23,"index":49},"identifierName":"foo"}, |
| 91 |
"name": "foo" |
| 92 |
}, |
| 93 |
"extra": { |
| 94 |
"shorthand": true |
| 95 |
} |
| 96 |
} |
| 97 |
] |
| 98 |
} |
| 99 |
] |
| 100 |
} |
| 101 |
} |
| 102 |
] |
| 103 |
}, |
| 104 |
"init": { |
| 105 |
"type": "Identifier", |
| 106 |
"start":56,"end":59,"loc":{"start":{"line":2,"column":30,"index":56},"end":{"line":2,"column":33,"index":59},"identifierName":"bar"}, |
| 107 |
"name": "bar" |
| 108 |
} |
| 109 |
} |
| 110 |
], |
| 111 |
"kind": "const" |
| 112 |
} |
| 113 |
} |
| 114 |
], |
| 115 |
"directives": [] |
| 116 |
} |
| 117 |
} |