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
126 lines
5.5 KiB
JSON
126 lines
5.5 KiB
JSON
{
|
|
"type": "File",
|
|
"start":0,"end":66,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":2,"column":44,"index":66}},
|
|
"errors": [
|
|
"SyntaxError: Identifier 'foo' has already been declared. (2:30)",
|
|
"SyntaxError: `foo` has already been exported. Exported identifiers must be unique. (2:30)"
|
|
],
|
|
"program": {
|
|
"type": "Program",
|
|
"start":0,"end":66,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":2,"column":44,"index":66}},
|
|
"sourceType": "module",
|
|
"interpreter": null,
|
|
"body": [
|
|
{
|
|
"type": "ExportNamedDeclaration",
|
|
"start":0,"end":21,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":21,"index":21}},
|
|
"specifiers": [],
|
|
"source": null,
|
|
"attributes": [],
|
|
"declaration": {
|
|
"type": "VariableDeclaration",
|
|
"start":7,"end":21,"loc":{"start":{"line":1,"column":7,"index":7},"end":{"line":1,"column":21,"index":21}},
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"start":13,"end":20,"loc":{"start":{"line":1,"column":13,"index":13},"end":{"line":1,"column":20,"index":20}},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"start":13,"end":16,"loc":{"start":{"line":1,"column":13,"index":13},"end":{"line":1,"column":16,"index":16},"identifierName":"foo"},
|
|
"name": "foo"
|
|
},
|
|
"init": {
|
|
"type": "NumericLiteral",
|
|
"start":19,"end":20,"loc":{"start":{"line":1,"column":19,"index":19},"end":{"line":1,"column":20,"index":20}},
|
|
"extra": {
|
|
"rawValue": 1,
|
|
"raw": "1"
|
|
},
|
|
"value": 1
|
|
}
|
|
}
|
|
],
|
|
"kind": "const"
|
|
}
|
|
},
|
|
{
|
|
"type": "ExportNamedDeclaration",
|
|
"start":22,"end":66,"loc":{"start":{"line":2,"column":0,"index":22},"end":{"line":2,"column":44,"index":66}},
|
|
"specifiers": [],
|
|
"source": null,
|
|
"attributes": [],
|
|
"declaration": {
|
|
"type": "VariableDeclaration",
|
|
"start":29,"end":66,"loc":{"start":{"line":2,"column":7,"index":29},"end":{"line":2,"column":44,"index":66}},
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"start":35,"end":65,"loc":{"start":{"line":2,"column":13,"index":35},"end":{"line":2,"column":43,"index":65}},
|
|
"id": {
|
|
"type": "ObjectPattern",
|
|
"start":35,"end":59,"loc":{"start":{"line":2,"column":13,"index":35},"end":{"line":2,"column":37,"index":59}},
|
|
"properties": [
|
|
{
|
|
"type": "ObjectProperty",
|
|
"start":37,"end":57,"loc":{"start":{"line":2,"column":15,"index":37},"end":{"line":2,"column":35,"index":57}},
|
|
"key": {
|
|
"type": "Identifier",
|
|
"start":37,"end":40,"loc":{"start":{"line":2,"column":15,"index":37},"end":{"line":2,"column":18,"index":40},"identifierName":"bar"},
|
|
"name": "bar"
|
|
},
|
|
"computed": false,
|
|
"method": false,
|
|
"shorthand": false,
|
|
"value": {
|
|
"type": "ObjectPattern",
|
|
"start":42,"end":57,"loc":{"start":{"line":2,"column":20,"index":42},"end":{"line":2,"column":35,"index":57}},
|
|
"properties": [
|
|
{
|
|
"type": "ObjectProperty",
|
|
"start":44,"end":47,"loc":{"start":{"line":2,"column":22,"index":44},"end":{"line":2,"column":25,"index":47}},
|
|
"key": {
|
|
"type": "Identifier",
|
|
"start":44,"end":47,"loc":{"start":{"line":2,"column":22,"index":44},"end":{"line":2,"column":25,"index":47},"identifierName":"baz"},
|
|
"name": "baz"
|
|
},
|
|
"computed": false,
|
|
"method": false,
|
|
"shorthand": true,
|
|
"value": {
|
|
"type": "Identifier",
|
|
"start":44,"end":47,"loc":{"start":{"line":2,"column":22,"index":44},"end":{"line":2,"column":25,"index":47},"identifierName":"baz"},
|
|
"name": "baz"
|
|
}
|
|
},
|
|
{
|
|
"type": "RestElement",
|
|
"start":49,"end":55,"loc":{"start":{"line":2,"column":27,"index":49},"end":{"line":2,"column":33,"index":55}},
|
|
"argument": {
|
|
"type": "Identifier",
|
|
"start":52,"end":55,"loc":{"start":{"line":2,"column":30,"index":52},"end":{"line":2,"column":33,"index":55},"identifierName":"foo"},
|
|
"name": "foo"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"init": {
|
|
"type": "Identifier",
|
|
"start":62,"end":65,"loc":{"start":{"line":2,"column":40,"index":62},"end":{"line":2,"column":43,"index":65},"identifierName":"qux"},
|
|
"name": "qux"
|
|
}
|
|
}
|
|
],
|
|
"kind": "const"
|
|
}
|
|
}
|
|
],
|
|
"directives": [],
|
|
"extra": {
|
|
"topLevelAwait": false
|
|
}
|
|
}
|
|
}
|