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

158 lines
3.3 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 69,
"end": 134,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 69,
"end": 86,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 75,
"end": 86,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 75,
"end": 82,
"ctxt": 0
},
"value": "orbitol",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 85,
"end": 86,
"ctxt": 0
},
"value": 1.0
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 87,
"end": 110,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 91,
"end": 110,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 91,
"end": 98,
"ctxt": 0
},
"value": "orbitol",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 101,
"end": 110,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "NumericLiteral",
"span": {
"start": 101,
"end": 102,
"ctxt": 0
},
"value": 1.0
},
"right": {
"type": "BooleanLiteral",
"span": {
"start": 105,
"end": 110,
"ctxt": 0
},
"value": false
}
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 111,
"end": 134,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 111,
"end": 134,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 111,
"end": 132,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 111,
"end": 118,
"ctxt": 0
},
"value": "orbitol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 119,
"end": 132,
"ctxt": 0
},
"value": "toExponential",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
}
],
"interpreter": null
}