| 1 |
{ |
| 2 |
"type": "File", |
| 3 |
"start":0,"end":59,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":6,"column":2,"index":59}}, |
| 4 |
"errors": [ |
| 5 |
"SyntaxError: Rest element must be last element. (3:13)" |
| 6 |
], |
| 7 |
"program": { |
| 8 |
"type": "Program", |
| 9 |
"start":0,"end":59,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":6,"column":2,"index":59}}, |
| 10 |
"sourceType": "script", |
| 11 |
"interpreter": null, |
| 12 |
"body": [ |
| 13 |
{ |
| 14 |
"type": "FunctionDeclaration", |
| 15 |
"start":0,"end":58,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":6,"column":1,"index":58}}, |
| 16 |
"id": { |
| 17 |
"type": "Identifier", |
| 18 |
"start":9,"end":12,"loc":{"start":{"line":1,"column":9,"index":9},"end":{"line":1,"column":12,"index":12},"identifierName":"foo"}, |
| 19 |
"name": "foo" |
| 20 |
}, |
| 21 |
"generator": false, |
| 22 |
"async": false, |
| 23 |
"params": [ |
| 24 |
{ |
| 25 |
"type": "Identifier", |
| 26 |
"start":20,"end":25,"loc":{"start":{"line":2,"column":4,"index":20},"end":{"line":2,"column":9,"index":25},"identifierName":"first"}, |
| 27 |
"name": "first" |
| 28 |
}, |
| 29 |
{ |
| 30 |
"type": "RestElement", |
| 31 |
"start":31,"end":40,"loc":{"start":{"line":3,"column":4,"index":31},"end":{"line":3,"column":13,"index":40}}, |
| 32 |
"argument": { |
| 33 |
"type": "Identifier", |
| 34 |
"start":34,"end":40,"loc":{"start":{"line":3,"column":7,"index":34},"end":{"line":3,"column":13,"index":40},"identifierName":"second"}, |
| 35 |
"name": "second" |
| 36 |
} |
| 37 |
}, |
| 38 |
{ |
| 39 |
"type": "Identifier", |
| 40 |
"start":46,"end":51,"loc":{"start":{"line":4,"column":4,"index":46},"end":{"line":4,"column":9,"index":51},"identifierName":"third"}, |
| 41 |
"name": "third" |
| 42 |
} |
| 43 |
], |
| 44 |
"body": { |
| 45 |
"type": "BlockStatement", |
| 46 |
"start":55,"end":58,"loc":{"start":{"line":5,"column":2,"index":55},"end":{"line":6,"column":1,"index":58}}, |
| 47 |
"body": [], |
| 48 |
"directives": [] |
| 49 |
} |
| 50 |
}, |
| 51 |
{ |
| 52 |
"type": "EmptyStatement", |
| 53 |
"start":58,"end":59,"loc":{"start":{"line":6,"column":1,"index":58},"end":{"line":6,"column":2,"index":59}} |
| 54 |
} |
| 55 |
], |
| 56 |
"directives": [] |
| 57 |
} |
| 58 |
} |