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

205 lines
4.6 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 0,
2022-02-04 14:17:42 +03:00
"end": 61,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 0,
"end": 13,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 4,
"end": 12,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 4,
"end": 5,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BooleanLiteral",
"span": {
"start": 8,
"end": 12,
"ctxt": 0
},
"value": true
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 15,
"end": 36,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
2022-02-04 14:17:42 +03:00
"start": 19,
"end": 35,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 19,
"end": 20,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
2022-02-04 14:17:42 +03:00
"start": 23,
"end": 35,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
2022-02-04 14:17:42 +03:00
"start": 23,
"end": 33,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 23,
"end": 24,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 25,
"end": 33,
"ctxt": 0
},
"value": "toString",
"optional": false
}
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 37,
"end": 61,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
2022-02-04 14:17:42 +03:00
"start": 41,
"end": 60,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 41,
"end": 42,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
2022-02-04 14:17:42 +03:00
"start": 45,
"end": 60,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
2022-02-04 14:17:42 +03:00
"start": 45,
"end": 58,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 45,
"end": 46,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "Computed",
"span": {
2022-02-04 14:17:42 +03:00
"start": 46,
"end": 58,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 47,
"end": 57,
"ctxt": 0
},
"value": "toString",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
}
],
"interpreter": null
}