mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
* chore: bump eslint and espree * fix: always initialize ExportDeclaration attributes * update AST fixtures * fix: initialize attributes when importAssertions is not enabled * update AST fixtures * update test snapshot * update Makefile.js * update Babel 8 AST fixtures
96 lines
3.8 KiB
JSON
96 lines
3.8 KiB
JSON
{
|
|
"type": "File",
|
|
"start":0,"end":53,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":2,"column":27,"index":53}},
|
|
"errors": [
|
|
"SyntaxError: Identifier 'foo' has already been declared. (2:15)",
|
|
"SyntaxError: `foo` has already been exported. Exported identifiers must be unique. (2:15)"
|
|
],
|
|
"program": {
|
|
"type": "Program",
|
|
"start":0,"end":53,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":2,"column":27,"index":53}},
|
|
"sourceType": "module",
|
|
"interpreter": null,
|
|
"body": [
|
|
{
|
|
"type": "ExportNamedDeclaration",
|
|
"start":0,"end":24,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":24,"index":24}},
|
|
"specifiers": [],
|
|
"source": null,
|
|
"attributes": [],
|
|
"declaration": {
|
|
"type": "FunctionDeclaration",
|
|
"start":7,"end":24,"loc":{"start":{"line":1,"column":7,"index":7},"end":{"line":1,"column":24,"index":24}},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"start":16,"end":19,"loc":{"start":{"line":1,"column":16,"index":16},"end":{"line":1,"column":19,"index":19},"identifierName":"foo"},
|
|
"name": "foo"
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"params": [],
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"start":22,"end":24,"loc":{"start":{"line":1,"column":22,"index":22},"end":{"line":1,"column":24,"index":24}},
|
|
"body": [],
|
|
"directives": []
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "EmptyStatement",
|
|
"start":24,"end":25,"loc":{"start":{"line":1,"column":24,"index":24},"end":{"line":1,"column":25,"index":25}}
|
|
},
|
|
{
|
|
"type": "ExportNamedDeclaration",
|
|
"start":26,"end":53,"loc":{"start":{"line":2,"column":0,"index":26},"end":{"line":2,"column":27,"index":53}},
|
|
"specifiers": [],
|
|
"source": null,
|
|
"attributes": [],
|
|
"declaration": {
|
|
"type": "VariableDeclaration",
|
|
"start":33,"end":53,"loc":{"start":{"line":2,"column":7,"index":33},"end":{"line":2,"column":27,"index":53}},
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"start":39,"end":52,"loc":{"start":{"line":2,"column":13,"index":39},"end":{"line":2,"column":26,"index":52}},
|
|
"id": {
|
|
"type": "ObjectPattern",
|
|
"start":39,"end":46,"loc":{"start":{"line":2,"column":13,"index":39},"end":{"line":2,"column":20,"index":46}},
|
|
"properties": [
|
|
{
|
|
"type": "ObjectProperty",
|
|
"start":41,"end":44,"loc":{"start":{"line":2,"column":15,"index":41},"end":{"line":2,"column":18,"index":44}},
|
|
"key": {
|
|
"type": "Identifier",
|
|
"start":41,"end":44,"loc":{"start":{"line":2,"column":15,"index":41},"end":{"line":2,"column":18,"index":44},"identifierName":"foo"},
|
|
"name": "foo"
|
|
},
|
|
"computed": false,
|
|
"method": false,
|
|
"shorthand": true,
|
|
"value": {
|
|
"type": "Identifier",
|
|
"start":41,"end":44,"loc":{"start":{"line":2,"column":15,"index":41},"end":{"line":2,"column":18,"index":44},"identifierName":"foo"},
|
|
"name": "foo"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"init": {
|
|
"type": "Identifier",
|
|
"start":49,"end":52,"loc":{"start":{"line":2,"column":23,"index":49},"end":{"line":2,"column":26,"index":52},"identifierName":"bar"},
|
|
"name": "bar"
|
|
}
|
|
}
|
|
],
|
|
"kind": "const"
|
|
}
|
|
}
|
|
],
|
|
"directives": [],
|
|
"extra": {
|
|
"topLevelAwait": false
|
|
}
|
|
}
|
|
}
|