swc/crates/swc_ecma_parser/tests/tsc/plainJSRedeclare.json

160 lines
3.4 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 70,
"end": 135,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 70,
"end": 87,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 76,
"end": 87,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 76,
"end": 83,
"ctxt": 0
},
"value": "orbitol",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 86,
"end": 87,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 88,
"end": 111,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 92,
"end": 111,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 92,
"end": 99,
"ctxt": 0
},
"value": "orbitol",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 102,
"end": 111,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "NumericLiteral",
"span": {
"start": 102,
"end": 103,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"right": {
"type": "BooleanLiteral",
"span": {
"start": 106,
"end": 111,
"ctxt": 0
},
"value": false
}
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 112,
"end": 135,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 112,
"end": 135,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 112,
"end": 133,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 112,
"end": 119,
"ctxt": 0
},
"value": "orbitol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 120,
"end": 133,
"ctxt": 0
},
"value": "toExponential",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
}
],
"interpreter": null
}