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

201 lines
4.5 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 1,
"end": 62,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 1,
"end": 14,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 5,
"end": 13,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 5,
"end": 6,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BooleanLiteral",
"span": {
"start": 9,
"end": 13,
"ctxt": 0
},
"value": true
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 16,
"end": 37,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 20,
"end": 36,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 20,
"end": 21,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 24,
"end": 36,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 24,
"end": 34,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 24,
"end": 25,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 26,
"end": 34,
"ctxt": 0
},
"value": "toString",
"optional": false
}
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 38,
"end": 62,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 42,
"end": 61,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 42,
"end": 43,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 46,
"end": 61,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 46,
"end": 59,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 46,
"end": 47,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 47,
"end": 59,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 48,
"end": 58,
"ctxt": 0
},
"value": "toString",
"raw": "'toString'"
}
}
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
}
],
"interpreter": null
}