mirror of
https://github.com/hanzoai/babel.git
synced 2026-10-30 14:46:06 +00:00
58 lines
2.1 KiB
JSON
58 lines
2.1 KiB
JSON
{
|
|
"type": "File",
|
|
"start":0,"end":25,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":25,"index":25}},
|
|
"errors": [
|
|
"SyntaxError: In non-strict mode code, functions can only be declared at top level or inside a block. (1:10)"
|
|
],
|
|
"program": {
|
|
"type": "Program",
|
|
"start":0,"end":25,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":25,"index":25}},
|
|
"sourceType": "script",
|
|
"interpreter": null,
|
|
"body": [
|
|
{
|
|
"type": "IfStatement",
|
|
"start":0,"end":25,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":25,"index":25}},
|
|
"test": {
|
|
"type": "NumericLiteral",
|
|
"start":4,"end":5,"loc":{"start":{"line":1,"column":4,"index":4},"end":{"line":1,"column":5,"index":5}},
|
|
"extra": {
|
|
"rawValue": 0,
|
|
"raw": "0"
|
|
},
|
|
"value": 0
|
|
},
|
|
"consequent": {
|
|
"type": "LabeledStatement",
|
|
"start":7,"end":25,"loc":{"start":{"line":1,"column":7,"index":7},"end":{"line":1,"column":25,"index":25}},
|
|
"body": {
|
|
"type": "FunctionDeclaration",
|
|
"start":10,"end":25,"loc":{"start":{"line":1,"column":10,"index":10},"end":{"line":1,"column":25,"index":25}},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"start":19,"end":20,"loc":{"start":{"line":1,"column":19,"index":19},"end":{"line":1,"column":20,"index":20},"identifierName":"f"},
|
|
"name": "f"
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"params": [],
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"start":23,"end":25,"loc":{"start":{"line":1,"column":23,"index":23},"end":{"line":1,"column":25,"index":25}},
|
|
"body": [],
|
|
"directives": []
|
|
}
|
|
},
|
|
"label": {
|
|
"type": "Identifier",
|
|
"start":7,"end":8,"loc":{"start":{"line":1,"column":7,"index":7},"end":{"line":1,"column":8,"index":8},"identifierName":"x"},
|
|
"name": "x"
|
|
}
|
|
},
|
|
"alternate": null
|
|
}
|
|
],
|
|
"directives": []
|
|
}
|
|
}
|