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

146 lines
3.3 KiB
JSON

{
"type": "Script",
"span": {
"start": 1,
"end": 44,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 1,
"end": 12,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 5,
"end": 11,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 5,
"end": 6,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "StringLiteral",
"span": {
"start": 9,
"end": 11,
"ctxt": 0
},
"value": "",
"raw": "''"
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 13,
"end": 44,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 17,
"end": 43,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 17,
"end": 18,
"ctxt": 0
},
"value": "d",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 21,
"end": 43,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 21,
"end": 32,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 21,
"end": 22,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 22,
"end": 32,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 23,
"end": 31,
"ctxt": 0
},
"value": "charAt",
"raw": "'charAt'"
}
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 33,
"end": 42,
"ctxt": 0
},
"value": "invalid",
"raw": "'invalid'"
}
}
],
"typeArguments": null
},
"definite": false
}
]
}
],
"interpreter": null
}